From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 14:32:24 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D5081065676 for ; Fri, 5 Sep 2008 14:32:24 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9D18FC1A for ; Fri, 5 Sep 2008 14:32:23 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from [87.242.97.68] (port=50236 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1Kbbt8-000GIc-40; Fri, 05 Sep 2008 14:02:14 +0000 Date: Fri, 5 Sep 2008 18:02:04 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20080905140204.GA6498@edoofus.dev.vega.ru> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080905070028.GN72107@obiwan.tataz.chchile.org> Cc: Dag-Erling Sm?rgrav , freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2008 14:32:24 -0000 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 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 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