src.conf(5) seems to affect ports build

Florent Thoumie flz at FreeBSD.org
Tue Oct 24 08:24:35 PDT 2006


On Tue, 2006-10-24 at 17:48 +0400, Ruslan Ermilov wrote:
> On Sun, Oct 22, 2006 at 05:34:36PM +0200, Jeremie Le Hen wrote:
> > Ruslan,
> > 
> > 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 bsd.port.mk; 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 <bsd.ssp.mk> that is included from both bsd.sys.mk
> > and bsd.port.mk:
> > 
> > % .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 bsd.ports.mk.  With your whole patch I would have to
> > either duplicate these bits in bsd.ports.mk or turn the condition to
> > something like:
> > 
> > % .if (defined(MK_SSP) && ${MK_SSP} != "no") || defined(WITH_SSP)
> > 
> > What do you advice me to do ?
> > 
> I still don't understand why my patch created a problem for you.
> This option is not in bsd.own.mk, so it's not covered by my patch.
> All my patch does is "don't process /etc/src.conf" which is entirely
> for src/.
> 
> So, you can continue to use your bsd.ssp.mk as before, and my patch
> shouldn't influence it.
> 
> If you want to really mimic the standard behavior, then bsd.ssp.mk
> should check the (WITH|WITHOUT)_SSP set by a user, and set MK_SSP
> to "yes/no", accordingly; setting MK_SSP by a user shouldn't be
> allowed or supported.  You then set WITH_SSP= in /etc/make.conf
> (or in /etc/src.conf if you want it only for src/), or pass
> -DWITH_SSP on the make command line, and you're done.
> 
> P.S.  There has been a patch floating around that adds support for
> /etc/ports.conf.

[...] that you sent :-)

Could try to revive the thread with a new patch.

-- 
Florent Thoumie
flz at FreeBSD.org
FreeBSD Committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061024/801d2e71/attachment.pgp


More information about the freebsd-hackers mailing list