Creation of the NO_SSP build knob
Jeremie Le Hen
jeremie at le-hen.org
Fri Sep 5 18:24:02 UTC 2008
Hi Ruslan,
On Fri, Sep 05, 2008 at 06:02:04PM +0400, Ruslan Ermilov wrote:
> This is not the way the things were designed to work.
>
> http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html
>
> WITH_*/WITHOUT_* are for users, and MK_* are for makefiles.
>
> NO_*'s are mainly for backwards compatibility and (to the lesser
> extent) to support some of the makefile buzzwords like NO_MAN.
>
> There's no possibility to easily make what you want, i.e., disable
> SSP for some parts of the tree. Doing it for particular makefiles
> OTOH should be pretty easy, by starting a makefile with the
> following two lines:
>
> .include <bsd.own.mk>
> MK_SSP=no
>
> bsd.own.mk will set MK_SSP as per default ("yes"), then possibly
> reset it to "no" if a user set WITHOUT_SSP (either on a command
> line, in /etc/make.conf, or in environment), and then the second
> line will unconditionally reset it to "no".
>
> This will work in the SSP case, but may not work in general
> because some options have dependencies. Fortunately, cases like
> this are rare. (There are several makefiles in the tree that
> already do this; "grep ^MK_" to see them.)
Thank you for this clarification.
Unfortunately, I can't use MK_SSP in Makefile.inc1. The only option I
see is to override SSP_CFLAGS on ${BMAKE} and ${TMAKE} command-line.
There is also a problem with some Makefile.inc containing NO_SSP. It's
not possible to turn those to "MK_SSP= no" because bsd.init.mk includes
../Makefile.inc before bsd.own.mk.
Would you agree with the attached patch? Or would you prefer to use
SSP_CFLAGS everywhere?
Thank you!
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MK_SSP=no.diff
Type: text/x-diff
Size: 11575 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080905/ae6ae169/MK_SSPno.bin
More information about the freebsd-hackers
mailing list