From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 14:24:35 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 676401065706 for ; Thu, 4 Sep 2008 14:24:35 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.freebsd.org (Postfix) with ESMTP id 237C38FC22 for ; Thu, 4 Sep 2008 14:24:34 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 9E8EB172C8; Thu, 4 Sep 2008 16:24:33 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp6-g19.free.fr (Postfix) with ESMTP id D57DF172C9; Thu, 4 Sep 2008 16:24:29 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 01A379B497; Thu, 4 Sep 2008 14:17:06 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id EDFC84089; Thu, 4 Sep 2008 16:17:05 +0200 (CEST) Date: Thu, 4 Sep 2008 16:17:05 +0200 From: Jeremie Le Hen To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080904141705.GL72107@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86ljy857zz.fsf@ds4.des.no> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@FreeBSD.org, Rui Paulo 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: Thu, 04 Sep 2008 14:24:35 -0000 On Thu, Sep 04, 2008 at 03:57:20PM +0200, Dag-Erling Smørgrav wrote: > Rui Paulo writes: > > Jeremie Le Hen writes: > > > My leaning is to create an additional knob NO_SSP, much like > > > NO_CPU_CFLAGS, that could be set internally. However I'm not sure it > > > complies with the src.conf(5) policy. Any objection to the patch below? > > We already have something like that. > > WITHOUT_SENDMAIL= is expanded to MK_SENDMAIL=no. > > > > You may want to do the same for SSP and keep the convention of the > > variable names. > > It already exists. Read share/mk/bsd.own.mk. I think I didn't explain the problem correctly, sorry. We indeed already have WITH_SSP/WITHOUT_SSP knob which is turned into MK_SSP="yes" or MK_SSP="no" respectively. The actual problem lies in Makefiles that define WITHOUT_SSP for some reason. For instance, in Makefile.inc1 the toolchain (namely bootstrap-tools, build-tools, cross-tools and a few other things) is built without SSP thanks to -DWITHOUT_SSP. For example: 224 BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ 225 ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ 226 DESTDIR= \ 227 BOOTSTRAPPING=${OSRELDATE} \ 228 -DWITHOUT_SSP \ 229 -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ 230 -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ 231 -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF There is a problem is the user defines WITH_SSP in src.conf or on command-line. In this case, bsd.own.mk screams because both WITH_SSP and WITHOUT_SSP are defined. Try to make buildworld with -DWITH_SSP, and it won't even fill your terminal before breaking :). That's why my proposition was to introduce NO_SSP, that could be used from those Makefiles instead of WITHOUT_SSP to work around the bsd.own.mk checks. But there may be a wiser or neater solution I can't devise by myself, that's why I'm asking. Thanks for your help. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >