Date: Fri, 5 Sep 2008 18:02:04 +0400 From: Ruslan Ermilov <ru@FreeBSD.org> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: Dag-Erling Sm?rgrav <des@des.no>, freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob Message-ID: <20080905140204.GA6498@edoofus.dev.vega.ru> In-Reply-To: <20080905070028.GN72107@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> <8663pbzp97.fsf@ds4.des.no> <20080905070028.GN72107@obiwan.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 05, 2008 at 09:00:28AM +0200, Jeremie Le Hen wrote: > Dag-Erling, > > On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Sm?rgrav wrote: > > Jeremie Le Hen <jeremie@le-hen.org> writes: > > > If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP. > > > But it will still not be possible to use WITH_SSP in src.conf or > > > command-line. > > > [...] > > > Shouldn't we have a knob that overrides whatever the user says, only for > > > internal use in the source tree? That was my original intent when > > > asking if I could add NO_SSP. > > > > That's *exactly* what NO_* does. Just add SSP to that list and replace > > WITHOUT_SSP with NO_SSP wherever it occurs in Makefiles in the tree. > > I've just tested it with NO_SSP and I can confirm it doesn't work > despite the explicit comment above stating otherwise. By the way, the > code is nearly identical between the supported options and the compat > ones, I don't see how it could override the user settings: > 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.) Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080905140204.GA6498>