NetBSD Problem Report #24811

Received: (qmail 17659 invoked by uid 605); 17 Mar 2004 04:06:06 -0000
Message-Id: <>
Date: Wed, 17 Mar 2004 15:06:02 +1100 (EST)
Subject: cpuflags vs pkgsrc GCC_REQD=3.3 on 1.6.2
X-Send-Pr-Version: 3.95

>Number:         24811
>Category:       pkg
>Synopsis: calls wrong gcc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    abs
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 17 04:07:00 +0000 2004
>Last-Modified:  Mon May 23 03:00:05 +0000 2022
>Originator:     Daniel Carosone
>Release:        NetBSD 1.6.2
pkgsrc on NetBSD 1.6.2 (or anything else with older gcc, or a different compiler in PKGSRC_COMPILER probably)

At the top of my global mk.conf, I have:
.sinclude "/usr/pkg/share/mk/"

The other day, I wanted to build some packages on a pentium4 running
1.6.2, and I wanted them to run fast.  I set GCC_REQD?=3.3 in that
machine's local mk.conf, and kicked off pkg_chk

The compiler framework built and installed gcc3.3.3 as a dependency
before the other packages, as expected, and I can only presume that
the package compilers were using it via buildlink.

However, was still seeing the system 2.95 compiler, and
setting flags to -march=pentiumpro which then was passed to gcc3 once
the buildlink environment was set up.

mrg wanted me to note, also, that cpuflags could be calling gcc
-dumpversion rather than messing with ${CC} -v | awk in the way it
does now.

as above
Probably the compiler/buildlink framework needs to learn about
cpuflags, and look for a switch variable from mk.conf to run it at the
right time against the right compiler.
[20110327 shattered] edited Environment: field

State-Changed-From-To: open->feedback 
State-Changed-By: abs 
State-Changed-When: Thu Apr 1 19:09:20 UTC 2004 
Ideally cpuflags should be using CC_VERSION, unfortunately CC_VERSION 
is defined by which is included after mk.conf (and 
It _could_ pick up on GCC_REQD, which would get it right in this case, but 
its not the right solution. 
One option would be to have a USE_CPUFLAGS pkgsrc variable which could 
then include it at the right point. 

Thoughts appreciated. 

Regarding -dumpversion - I'd be happy to switch but I'd need to confirm 
what egcs returned in that case to ensure I fixed up the compiler options 
correctly (I'll check with mrg :) 

Responsible-Changed-From-To: pkg-manager->abs 
Responsible-Changed-By: abs 
Responsible-Changed-When: Thu Apr 1 19:09:20 UTC 2004 

From: David Brownlee <>
Subject: Re: pkg/24811
Date: Thu, 1 Apr 2004 20:48:30 +0100 (BST)

 	cpuflags updated to use -dumpversion with appropriate mangling for
 	egcs :)

 		David/absolute          -- No hype required --

From: Daniel Carosone <>
Subject: Re: pkg/24811
Date: Fri, 2 Apr 2004 11:17:30 +1000

 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Thu, Apr 01, 2004 at 07:13:11PM -0000, wrote:
 > One option would be to have a USE_CPUFLAGS pkgsrc variable which could
 > then include it at the right point.

 That's basically my assumption of what's needed too.

 Content-Type: application/pgp-signature
 Content-Disposition: inline

 Version: GnuPG v1.2.4 (NetBSD)


State-Changed-From-To: feedback->analyzed 
State-Changed-By: wiz 
State-Changed-When: Tue Jul 27 15:55:36 UTC 2004 
Feedback supplied, problem analyzed (or perhaps even fixed?). 
State-Changed-From-To: analyzed->feedback
State-Changed-When: Mon, 23 May 2022 03:00:05 +0000
Is this fixed? The comment log suggests that a fix was committed ages ago.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.