Date: Thu, 4 Sep 2008 16:17:05 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no> Cc: freebsd-hackers@FreeBSD.org, Rui Paulo <rpaulo@FreeBSD.org> Subject: Re: Creation of the NO_SSP build knob Message-ID: <20080904141705.GL72107@obiwan.tataz.chchile.org> In-Reply-To: <86ljy857zz.fsf@ds4.des.no> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 04, 2008 at 03:57:20PM +0200, Dag-Erling Smørgrav wrote: > Rui Paulo <rpaulo@FreeBSD.org> writes: > > Jeremie Le Hen <jeremie@le-hen.org> 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080904141705.GL72107>