Subject: Re: pkg/29142: bsd.wrapper.mk rev. 1.13 breaks non-gcc compilers
To: None <jlam@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: grant beattie <grant@NetBSD.org>
List: pkgsrc-bugs
Date: 02/23/2005 08:24:02
The following reply was made to PR pkg/29142; it has been noted by GNATS.
From: grant beattie <grant@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: jlam@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/29142: bsd.wrapper.mk rev. 1.13 breaks non-gcc compilers
Date: Wed, 23 Feb 2005 19:23:28 +1100
On Tue, Feb 01, 2005 at 03:28:02PM +0000, Johnny Lam wrote:
> The code is intended to allow a user to set both CC and PKGSRC_COMPILER
> in /etc/mk.conf, e.g.
>
> CC= /my/beta/sunpro/cc -super-optimize
> PKGSRC_COMPILER= sunpro
I suppose this is a desirable thing to support, since outside
pkgsrc-land, one is usually able to set CC to something like the above
and have things Just Work. this desire might rule out adding something
new like PKGSRC_CFLAGS ...
> The problem here, which I didn't detect on my GCC system, is that the
> value of CC in sys.mk is implicitly set before any CC in /etc/mk.conf is
> set. I verified this on my system by adding:
>
> CC?= myflargle
>
> to /etc/mk.conf and running "make show-var VARNAME=CC" in
> pkgsrc/security/priv, which yielded "cc", the value set from sys.mk.
right, I'd forgotten about this...
> By the time compiler.mk is included, there isn't any way to determine
> where CC is being set -- all we know is that it's been pre-defined
> before compiler.mk is included.
I've been trying to think of ways that we could possibly remove the
definition of CC/CXX (and others) from sys.mk, but that may pose a
problem with using bmake for non-pkgsrc purposes.
grant.