Module Name:    src
Committed By:   tron
Date:           Wed Nov 11 16:35:45 UTC 2009

Modified Files:
        src/share/mk: bsd.sys.mk bsd.x11.mk

Log Message:
Enable Stack Smash Protection (SSP) by default for NetBSD/amd64 and
NetBSD/i386 as previously discussed on the "port-amd64" and
"port-i386" mailing lists. No objections from the core team.

Thanks a lot to Tobias Nygren for helping me with the benchmarking
and to Christos Zoulas for fixing SSP problems in cgd(4).


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.79 -r1.80 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.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.181 src/share/mk/bsd.sys.mk:1.182
--- src/share/mk/bsd.sys.mk:1.181	Mon Nov  9 15:58:09 2009
+++ src/share/mk/bsd.sys.mk	Wed Nov 11 16:35:45 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.181 2009/11/09 15:58:09 skrll Exp $
+#	$NetBSD: bsd.sys.mk,v 1.182 2009/11/11 16:35:45 tron Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -59,6 +59,11 @@
 HAS_SSP=	yes
 .endif
 
+.if ((${MACHINE_ARCH} == "amd64") || (${MACHINE_ARCH} == "i386") && \
+     (_SRC_TOP_ != ""))
+USE_SSP?=	yes
+.endif
+
 .if defined(USE_FORT) && (${USE_FORT} != "no")
 USE_SSP?=	yes
 .if !defined(KERNSRCDIR) && !defined(KERN) # not for kernels nor kern modules

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.79 src/share/mk/bsd.x11.mk:1.80
--- src/share/mk/bsd.x11.mk:1.79	Mon Nov  9 07:38:14 2009
+++ src/share/mk/bsd.x11.mk	Wed Nov 11 16:35:45 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.79 2009/11/09 07:38:14 mrg Exp $
+#	$NetBSD: bsd.x11.mk,v 1.80 2009/11/11 16:35:45 tron Exp $
 
 .include <bsd.init.mk>
 
@@ -8,6 +8,8 @@
 
 COPTS+=			-fno-strict-aliasing
 
+.include <bsd.sys.mk>
+
 .if defined(USE_SSP) && (${USE_SSP} != "no")
 CPPFLAGS+=		-DNO_ALLOCA
 .endif

Reply via email to