Subject: Re: CVS commit: pkgsrc/mk/compiler
To: Jonathan Perkin <firstname.lastname@example.org>
From: Johnny C. Lam <jlam@NetBSD.org>
Date: 05/18/2005 11:33:14
Jonathan Perkin wrote:
> * On 2005-05-17 at 20:06 BST, Roland Illig wrote:
>>The sunpro wrapper now creates aliases for gcc and g++, too. This is
>>needed because the <sys.mk> Makefile fragment sets CC?=gcc.
> This worries me a little. I can't help but think there are loads of
> badly written configure scripts which see "gcc" and assume it is the
> GNU compiler. Also you'll end up with programs such as libtool hard
> coding CC=gcc in them, causing problems when compiling software
> outside of pkgsrc using those tools.
> We already inform people using sunpro to set CC CXX and CPP explicitly
> to avoid this and this appears to work very well. I can't remember
> the reason we don't set these in sunpro.mk (Johnny?) but I think that
> would be the correct approach for this rather than trying to fake the
I asked Roland to commit it if it fixes problems for current users. I
am planning on rewriting the compiler & wrapper stuff next week, and it
will all very likely change anyway.
However, I'm of two minds on the way that the wrapper framework should
work. I would very much like for packages to understand the different
compilers that can be used, but I'm slowly coming to the conclusion that
we should have the wrapper framework just make other compilers look like
GCC. I haven't come across configure scripts that assume "gcc" is the
GNU compiler because autoconf provides its own macros for compiler
detection that check for GNU gcc in the right way. However, the answer
to the question of whether the gcc alias should be created can be
deferred till later as the rewrite will make it easy to go one way or
the other (I favor letting experimenting with both options to see which
way is best).
-- Johnny Lam <jlam@NetBSD.org>