NetBSD Problem Report #24811

Received: (qmail 17659 invoked by uid 605); 17 Mar 2004 04:06:06 -0000
Message-Id: <20040317040602.7722249FA7@bcd.geek.com.au>
Date: Wed, 17 Mar 2004 15:06:02 +1100 (EST)
From: dan@geek.com.au
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: dan@geek.com.au
To: gnats-bugs@gnats.NetBSD.org
Subject: cpuflags vs pkgsrc GCC_REQD=3.3 on 1.6.2
X-Send-Pr-Version: 3.95

>Number:         24811
>Category:       pkg
>Synopsis:       cpuflags.mk calls wrong gcc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    abs
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 17 04:07:00 +0000 2004
>Closed-Date:    
>Last-Modified:  Sun Mar 27 17:19:02 +0000 2011
>Originator:     Daniel Carosone
>Release:        NetBSD 1.6.2
>Organization:
dis-
>Environment:
pkgsrc on NetBSD 1.6.2 (or anything else with older gcc, or a different compiler in PKGSRC_COMPILER probably)
>Description:

At the top of my global mk.conf, I have:
.sinclude "/usr/pkg/share/mk/cpuflags.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, cpuflags.mk 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.

>How-To-Repeat:
as above
>Fix:
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.
>Release-Note:
>Audit-Trail:
[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 
State-Changed-Why:  
Ideally cpuflags should be using CC_VERSION, unfortunately CC_VERSION 
is defined by compiler.mk which is included after mk.conf (and cpuflags.mk) 
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 
Responsible-Changed-Why:  

From: David Brownlee <abs@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc: dan@geek.com.au, pkg-manager@netbsd.org
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          -- www.netbsd.org: No hype required --

From: Daniel Carosone <dan@geek.com.au>
To: gnats-bugs@gnats.netbsd.org
Cc: dan@geek.com.au, abs@netbsd.org, pkg-manager@netbsd.org
Subject: Re: pkg/24811
Date: Fri, 2 Apr 2004 11:17:30 +1000

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

 On Thu, Apr 01, 2004 at 07:13:11PM -0000, abs@netbsd.org 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.

 --
 Dan.
 --FCuugMFkClbJLl1L
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (NetBSD)

 iD8DBQFAbL8qEAVxvV4N66cRAn7pAKDPi/1RWvXEvOls3oIrAoinI8Lp6wCg5hwu
 eR5rV7lTs0l9WIyh2G1J/bQ=
 =EzgD
 -----END PGP SIGNATURE-----

 --FCuugMFkClbJLl1L--
State-Changed-From-To: feedback->analyzed 
State-Changed-By: wiz 
State-Changed-When: Tue Jul 27 15:55:36 UTC 2004 
State-Changed-Why:  
Feedback supplied, problem analyzed (or perhaps even fixed?). 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.