Re: Creation of the NO_SSP build knob
Ruslan Ermilov [EMAIL PROTECTED] writes: 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: That's not what Jeremie wants, that's what the Makefiles already do. Parts of the tree *can't* be built with SSP enabled, and the Makefiles set WITHOUT_SSP to disable it. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Creation of the NO_SSP build knob
Hello Dag-Erling, On Mon, Sep 08, 2008 at 01:16:16PM +0200, Dag-Erling Smørgrav wrote: Ruslan Ermilov [EMAIL PROTECTED] writes: 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: That's not what Jeremie wants, that's what the Makefiles already do. Parts of the tree *can't* be built with SSP enabled, and the Makefiles set WITHOUT_SSP to disable it. That's what the Makefiles already do indeed. Please excuse me if my english wasn't good enough to express it correctly. You are right to say that parts of the tree can't be build with SSP enabled. IMHO, the problem lies in the way it's enforced: using WITH_SSP shouldn't lead to a build error. The patch I sent along my reply to Ruslan corrects this. By the way, I think WITH_*/WITHOUT_* options should be user-only options and shouldn't be used in the source tree. This would avoid this kind of problem. Regards, -- Jeremie Le Hen jeremie at le-hen dot org ttz at chchile dot org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
Dag-Erling, On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Smørgrav wrote: Jeremie Le Hen [EMAIL PROTECTED] 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: 186 # 187 # Supported NO_* options (if defined, MK_* will be forced to no, 188 # regardless of user's setting). 189 # 190 .for var in \ 191 INSTALLLIB \ 192 MAN \ 193 PROFILE \ 194 SSP 195 .if defined(NO_${var}) 196 WITHOUT_${var}= 197 .endif 198 .endfor 199 200 # 201 # Compat NO_* options (same as above, except their use is deprecated). 202 # 203 .if !defined(BURN_BRIDGES) 204 .for var in \ 205 ACPI \ [...] 267 WPA_SUPPLICANT_EAPOL 268 .if defined(NO_${var}) 269 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}= 270 WITHOUT_${var}= 271 .endif 272 .endfor 273 .endif # !defined(BURN_BRIDGES) The attached patch implements a behaviour that seems more correct to me WRT the intent. What do you think of it? Thanks! -- Jeremie Le Hen jeremie at le-hen dot org ttz at chchile dot org Index: bsd.own.mk === RCS file: /mnt/octobre/space/freebsd-cvs/src/share/mk/bsd.own.mk,v retrieving revision 1.77 diff -u -r1.77 bsd.own.mk --- bsd.own.mk 16 Jun 2008 07:23:12 - 1.77 +++ bsd.own.mk 5 Sep 2008 06:56:17 - @@ -182,19 +182,6 @@ # # -# Supported NO_* options (if defined, MK_* will be forced to no, -# regardless of user's setting). -# -.for var in \ -INSTALLLIB \ -MAN \ -PROFILE -.if defined(NO_${var}) -WITHOUT_${var}= -.endif -.endfor - -# # Compat NO_* options (same as above, except their use is deprecated). # .if !defined(BURN_BRIDGES) @@ -393,6 +380,19 @@ .endfor # +# Supported NO_* options (if defined, MK_* will be forced to no, +# regardless of user's setting). +# +.for var in \ +INSTALLLIB \ +MAN \ +PROFILE +.if defined(NO_${var}) +MK_${var}= no +.endif +.endfor + +# # Force some options off if their dependencies are off. # Order is somewhat important. # ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] FreeBSD committer ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
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 Index: Makefile.inc1 === RCS file: /mnt/octobre/space/freebsd-cvs/src/Makefile.inc1,v retrieving revision 1.610 diff -u -p -r1.610 Makefile.inc1 --- Makefile.inc1 19 Aug 2008 14:23:26 - 1.610 +++ Makefile.inc1 5 Sep 2008 15:16:25 - @@ -225,7 +225,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DWITHOUT_SSP \ + SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF @@ -235,8 +235,9 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ + SSP_CFLAGS= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF -DWITHOUT_SSP + -DNO_WARNS -DNO_CTF # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -453,7 +454,7 @@ build32: .if ${MK_KERBEROS} != no .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ ${_t} .endfor .endif @@ -476,7 +477,7 @@ build32: .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ build-tools .endfor cd ${.CURDIR}; \ @@ -765,14 +766,14 @@ buildkernel: @echo -- cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) !defined(NO_MODULES) exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Index: gnu/lib/csu/Makefile === RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/csu/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- gnu/lib/csu/Makefile 25 Jun 2008 21:33:28 - 1.29 +++ gnu/lib/csu/Makefile 5 Sep 2008 15:24:07 - @@ -1,5 +1,8 @@ # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.29 2008/06/25 21:33:28 ru Exp $ +.include bsd.own.mk +MK_SSP= no + GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs CCDIR= ${.CURDIR}/../../usr.bin/cc @@ -19,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -WITHOUT_SSP= .if ${MACHINE_ARCH} == ia64 BEGINSRC= crtbegin.asm Index: gnu/lib/libssp/Makefile === RCS
Creation of the NO_SSP build knob
Hello, There is currently a knob to enable/disable SSP: WITH_SSP or WITHOUT_SSP. WITH_SSP is the default on -CURRENT, so no one had to put WITH_SSP= in src.conf(5). This has hidden the following bug so far: When buildworld is run with WITH_SSP= on command-line or in src.conf(5), it fails immediately with the following message, because the toolchain is built with WITHOUT_SSP: % /usr/src/share/mk/bsd.own.mk, line 365: WITH_SSP and WITHOUT_SSP can't both be set. 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? Thank you! Best regards, -- Jeremie Le Hen jeremie at le-hen dot org ttz at chchile dot org Index: Makefile.inc1 === RCS file: /mnt/octobre/space/freebsd-cvs/src/Makefile.inc1,v retrieving revision 1.610 diff -u -p -r1.610 Makefile.inc1 --- Makefile.inc1 19 Aug 2008 14:23:26 - 1.610 +++ Makefile.inc1 4 Sep 2008 12:42:50 - @@ -225,7 +225,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DWITHOUT_SSP \ + -DNO_SSP \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF @@ -236,7 +236,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF -DWITHOUT_SSP + -DNO_WARNS -DNO_CTF -DNO_SSP # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -453,7 +453,7 @@ build32: .if ${MK_KERBEROS} != no .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DNO_SSP DESTDIR= \ ${_t} .endfor .endif @@ -476,7 +476,7 @@ build32: .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DNO_SSP DESTDIR= \ build-tools .endfor cd ${.CURDIR}; \ @@ -765,14 +765,14 @@ buildkernel: @echo -- cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} -DNO_SSP -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) !defined(NO_MODULES) exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} -DNO_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Index: gnu/lib/csu/Makefile === RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/csu/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- gnu/lib/csu/Makefile 25 Jun 2008 21:33:28 - 1.29 +++ gnu/lib/csu/Makefile 4 Sep 2008 12:42:50 - @@ -19,7 +19,7 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -WITHOUT_SSP= +NO_SSP= .if ${MACHINE_ARCH} == ia64 BEGINSRC= crtbegin.asm Index: gnu/lib/libssp/Makefile === RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/libssp/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- gnu/lib/libssp/Makefile 25 Jun 2008 21:33:28 - 1.3 +++ gnu/lib/libssp/Makefile 4 Sep 2008 12:42:50 - @@ -10,7 +10,7 @@ LIB= ssp SHLIB_MAJOR= 0 SHLIBDIR?= /lib NO_PROFILE= -WITHOUT_SSP= +NO_SSP= SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ Index: lib/csu/Makefile.inc === RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/csu/Makefile.inc,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.inc --- lib/csu/Makefile.inc 25 Jun 2008 21:33:28 - 1.1 +++ lib/csu/Makefile.inc 4 Sep 2008 12:42:50 - @@ -1,3 +1,3 @@ # $FreeBSD: src/lib/csu/Makefile.inc,v 1.1 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= Index: lib/libstand/Makefile === RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/libstand/Makefile,v retrieving revision 1.62 diff -u -p -r1.62 Makefile --- lib/libstand/Makefile 25 Jun 2008 21:33:28 - 1.62 +++
Re: Creation of the NO_SSP build knob
On Thu, Sep 04, 2008 at 02:46:53PM +0200, Jeremie Le Hen wrote: Hello, There is currently a knob to enable/disable SSP: WITH_SSP or WITHOUT_SSP. WITH_SSP is the default on -CURRENT, so no one had to put WITH_SSP= in src.conf(5). This has hidden the following bug so far: When buildworld is run with WITH_SSP= on command-line or in src.conf(5), it fails immediately with the following message, because the toolchain is built with WITHOUT_SSP: % /usr/src/share/mk/bsd.own.mk, line 365: WITH_SSP and WITHOUT_SSP can't both be set. 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. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
Rui Paulo [EMAIL PROTECTED] writes: Jeremie Le Hen [EMAIL PROTECTED] 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. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
On Thu, Sep 04, 2008 at 03:57:20PM +0200, Dag-Erling Smørgrav wrote: Rui Paulo [EMAIL PROTECTED] writes: Jeremie Le Hen [EMAIL PROTECTED] 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 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
Jeremie Le Hen [EMAIL PROTECTED] writes: 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 :). bsd.own.mk: 184 # 185 # Supported NO_* options (if defined, MK_* will be forced to no, 186 # regardless of user's setting). 187 # 188 .for var in \ 189 INSTALLLIB \ 190 MAN \ 191 PROFILE 192 .if defined(NO_${var}) 193 WITHOUT_${var}= 194 .endif 195 .endfor DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
On Thu, Sep 04, 2008 at 04:48:28PM +0200, Dag-Erling Smørgrav wrote: bsd.own.mk: 184 # 185 # Supported NO_* options (if defined, MK_* will be forced to no, 186 # regardless of user's setting). 187 # 188 .for var in \ 189 INSTALLLIB \ 190 MAN \ 191 PROFILE 192 .if defined(NO_${var}) 193 WITHOUT_${var}= 194 .endif 195 .endfor Ok, thank you Dag-Erling. I didn't understand what you meant the first time. 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. Does this mean that enforcing the default values with knobs is not supported? Or put differently, is it forbidden to use the opposite knobs of those documented in src.conf(5)? bsd.own.mk has the following test: 361 .if defined(WITH_${var}) defined(WITHOUT_${var}) 362 .error WITH_${var} and WITHOUT_${var} can't both be set. 363 .endif So I would say that it is allowed to use WITH_SSP, even if it's the default. This can be a problem. Let's say a user has WITH_INFO= in src.conf for some reason. If WITHOUT_INFO= is used somewhere in the source tree, it will break with an error misleading for the user: WITH_INFO and WITHOUT_INFO can't be both set. 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. Regards, -- Jeremie Le Hen jeremie at le-hen dot org ttz at chchile dot org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creation of the NO_SSP build knob
Jeremie Le Hen [EMAIL PROTECTED] 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. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]