Module Name: src
Committed By: christos
Date: Sun Mar 13 17:56:56 UTC 2016
Modified Files:
src/share/mk: bsd.README bsd.own.mk bsd.sys.mk bsd.x11.mk
Log Message:
Add NO{SSP,FORTIFY}
To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/share/mk/bsd.README
cvs rdiff -u -r1.906 -r1.907 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.254 -r1.255 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.117 -r1.118 src/share/mk/bsd.x11.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.352 src/share/mk/bsd.README:1.353
--- src/share/mk/bsd.README:1.352 Sat Feb 20 22:34:27 2016
+++ src/share/mk/bsd.README Sun Mar 13 13:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.352 2016/02/21 03:34:27 christos Exp $
+# $NetBSD: bsd.README,v 1.353 2016/03/13 17:56:56 christos Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -487,6 +487,9 @@ USE_SSP If "no", disables GCC stack pro
of about 5%.
Default: "no", unless "USE_FORT" is set to "yes"
+NOSSP Don't compile with stack protector during build.
+ It is set internally for standalone programs.
+
USE_FORT If "yes" turns on substitute wrappers for commonly used
functions that do not do bounds checking regularly, but
they could in some cases by using the gcc
@@ -495,6 +498,9 @@ USE_FORT If "yes" turns on substitute w
These substitute functions are in /usr/include/ssp.
Default: depends on the part of the source tree
+NOFORT Don't compile with substitute wrappers during build.
+ It is set internally for standalone programs.
+
USE_YP If "no", disables building YP (NIS) support into
various system utilities/libraries that support it.
If ${MKYP} is "no", USE_YP will also be forced to "no".
Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.906 src/share/mk/bsd.own.mk:1.907
--- src/share/mk/bsd.own.mk:1.906 Sat Mar 12 20:06:51 2016
+++ src/share/mk/bsd.own.mk Sun Mar 13 13:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.906 2016/03/13 01:06:51 mrg Exp $
+# $NetBSD: bsd.own.mk,v 1.907 2016/03/13 17:56:56 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -122,7 +122,7 @@ HAVE_LIBGCC_EH?= yes
HAVE_SSP?= no
.else
HAVE_SSP?= yes
-.if ${USE_FORT:Uno} != "no"
+.if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
USE_SSP?= yes
.endif
.endif
Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.254 src/share/mk/bsd.sys.mk:1.255
--- src/share/mk/bsd.sys.mk:1.254 Sat Mar 12 18:08:58 2016
+++ src/share/mk/bsd.sys.mk Sun Mar 13 13:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.254 2016/03/12 23:08:58 mrg Exp $
+# $NetBSD: bsd.sys.mk,v 1.255 2016/03/13 17:56:56 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -114,7 +114,7 @@ _NOWERROR= ${defined(NOGCCERROR) || (${A
CFLAGS+= ${${_NOWERROR} == "no" :?-Werror:} ${CWARNFLAGS}
LINTFLAGS+= ${DESTDIR:D-d ${DESTDIR}/usr/include}
-.if (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
+.if !defined(NOSSP) && (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
.if !defined(KERNSRCDIR) && !defined(KERN) # not for kernels nor kern modules
CPPFLAGS+= -D_FORTIFY_SOURCE=2
.endif
Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.117 src/share/mk/bsd.x11.mk:1.118
--- src/share/mk/bsd.x11.mk:1.117 Thu Jul 23 04:03:26 2015
+++ src/share/mk/bsd.x11.mk Sun Mar 13 13:56:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.x11.mk,v 1.117 2015/07/23 08:03:26 mrg Exp $
+# $NetBSD: bsd.x11.mk,v 1.118 2016/03/13 17:56:56 christos Exp $
.include <bsd.init.mk>
@@ -10,7 +10,7 @@ COPTS+= -fno-strict-aliasing
.include <bsd.sys.mk>
-.if defined(USE_SSP) && (${USE_SSP} != "no")
+.if !defined(NOSSP) && (${USE_SSP:Uno} != "no")
CPPFLAGS+= -DNO_ALLOCA
.endif