NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/60858 CVS commit: src



The following reply was made to PR lib/60858; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/60858 CVS commit: src
Date: Thu, 8 Oct 2026 19:11:10 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Oct  8 19:11:10 UTC 2026
 
 Modified Files:
 	src/share/mk: bsd.own.mk
 	src/sys/arch/amd64/conf: Makefile.amd64
 	src/sys/arch/amd64/include: Makefile.inc
 	src/sys/arch/i386/conf: Makefile.i386
 	src/sys/arch/i386/include: Makefile.inc
 	src/sys/arch/sparc64/conf: Makefile.sparc64
 	src/sys/arch/xen/conf: Makefile.xen
 	src/sys/conf: ssp.mk
 
 Log Message:
 sys: Fix USE_SSP?=yes settings in amd64, i386, and sparc64 makefiles.
 
 This was recently broken by the change in bsd.own.mk rev. 1.1488 to
 fix USE_FORT?=yes after bsd.own.mk in userland makefiles, which
 worked by unconditionally adding a conditional definition of USE_SSP
 based on lazy expansion of USE_FORT, instead of conditionally adding
 a conditional definition of USE_SSP based on eager expansion of
 USE_FORT (confused yet?):
 
 -.if ... ${USE_FORT:Uno} != "no" ...
 -USE_SSP?=	yes
 -.endif
 +USE_SSP?=	${... ${USE_FORT:Uno} != "no" ...:?yes:no}
 
 This isolated (ha) change to bsd.own.mk saved the trouble of editing
 dozens of userland makefiles to ensure that USE_FORT is defined
 before bsd.own.mk -- and the trouble of adding diagnostics to detect
 the mistake should it rear its head again.  And it solved the problem
 systematically for userland.
 
 Unfortunately, the ordering of includes and definitions in the kernel
 and module makefiles is a little different.  To save the trouble of
 rearranging them, we just have the kernel makefiles where SSP is on
 by default say so by defining USE_SSP_DEFAULT=yes, which is picked up
 by the new:
 
 +USE_SSP?=	${... ${USE_FORT:Uno} ...:?yes:no}
 +USE_SSP?=	${... ${USE_FORT:Uno} ...:?yes:${USE_SSP_DEFAULT:Uno}}
 
 This mechanism still allows kernel configs to specify
 
 makeoptions 	USE_SSP="no"
 
 to override the architecture default, e.g. in i386 GENERIC_TINY.
 
 In sys/conf/ssp.mk, change ${USE_SSP:Uno} to ${USE_SSP} so that if,
 somehow, we lose the definition of USE_SSP, make(1) will fail noisily
 rather than silently.
 
 PR lib/60858: fortuitous embarrassment: fortify is all kinds of busted
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.1488 -r1.1489 src/share/mk/bsd.own.mk
 cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/conf/Makefile.amd64
 cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/include/Makefile.inc
 cvs rdiff -u -r1.197 -r1.198 src/sys/arch/i386/conf/Makefile.i386
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/include/Makefile.inc
 cvs rdiff -u -r1.86 -r1.87 src/sys/arch/sparc64/conf/Makefile.sparc64
 cvs rdiff -u -r1.50 -r1.51 src/sys/arch/xen/conf/Makefile.xen
 cvs rdiff -u -r1.5 -r1.6 src/sys/conf/ssp.mk
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 



Home | Main Index | Thread Index | Old Index