CC, CXX et al in build, test and destroot phases

Anders F Björklund afb at macports.org
Mon Mar 23 01:39:36 PDT 2009


Toby Peterson wrote:

> On Sun, Mar 22, 2009 at 16:19, Ryan Schmidt  
> <ryandesign at macports.org> wrote:
>> So I ask again: can you think of any reason why we should not set  
>> these
>> variables in the build, test and destroot phases? Can you think of  
>> any
>> problems it would cause?
>
> CC is probably safe, others not so much (e.g. CFLAGS might cause
> unexpected overrides). Still, I prefer to avoid special-casing as much
> as possible. If a few ports have to be a bit more explicit, I don't
> think that's the end of the world.

There's a lot of ports ignoring CFLAGS too (in addition to CC),
as was noted when experimenting with the -m32 and -m64 flags...
Not so important when it's "-O2" versus "-O3 -fomit-frame-pointer",
but annoying indeed when it skips over a -m64 or -arch x86_64.

So if all the ports could be made to respect $CC and $CFLAGS
(and $CXX and $CXXFLAGS), that would ultimately be a good thing.
Then again, there's always someone* that feels the need to rewrite
autotools in python and change the names of the variables slightly...

* Looking at you, Waf.

--anders



More information about the macports-dev mailing list