src.conf(5) seems to affect ports build

Jeremie Le Hen jeremie at
Sun Oct 22 08:33:54 PDT 2006


On Sat, Oct 21, 2006 at 09:25:33PM +0400, Ruslan Ermilov wrote:
> > Also, your patch avoids performing the WITH(OUT)_* stuff for ports in
> > order to prevent from polluting the namespace.  If there is to be
> > some WITH(OUT)_* knobs which leads to CFLAGS modification in the future
> > (I'm thinking about ProPolice with the upcoming GCC 4.1), wouldn't it
> > be worth benefiting this framework for ports ?
> It avoids only /etc/src.conf stuff when running; if you put
> WITH(OUT)_* in /etc/make.conf it will still be picked up.

Yes indeed, but MK_FOO won't be set and this would require to either
duplicate the code that modifies CFLAGS, or at least test for MK_FOO
or WITH_FOO at the same time.

Let me show you an example.

I have an additional <> that is included from both

% .if ${MK_SSP} != "no"
% SSP_CFLAGS      ?=      -fstack-protector
% CFLAGS          +=      ${SSP_CFLAGS}
% . if defined(WARNS) && ${WARNS} >= 7 && !empty(SSP_CFLAGS)
% CWARNFLAGS      +=      -Wstack-protector
% . endif
% .endif

Currently it is thus quite useful to use MK_SSP when this file is
included from  With your whole patch I would have to
either duplicate these bits in or turn the condition to
something like:

% .if (defined(MK_SSP) && ${MK_SSP} != "no") || defined(WITH_SSP)

What do you advice me to do ?

Thank you for your help.
Best regards,
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >

More information about the freebsd-hackers mailing list