Module Name:    src
Committed By:   plunky
Date:           Wed Aug 31 20:16:43 UTC 2011

Modified Files:
        src/sys/conf: Makefile.kern.inc

Log Message:
for multi-cpu machines, cpu_hatch() straddles the init of
__stack_chk_guard, so ensure stack protection is disabled
on x86 architectures (I don't know about other archs)


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.147 src/sys/conf/Makefile.kern.inc:1.148
--- src/sys/conf/Makefile.kern.inc:1.147	Sun Aug 28 23:15:53 2011
+++ src/sys/conf/Makefile.kern.inc	Wed Aug 31 20:16:43 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.147 2011/08/28 23:15:53 jmcneill Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.148 2011/08/31 20:16:43 plunky Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -96,6 +96,12 @@
 COPTS.kern_ssp.c+=	-fno-stack-protector -D__SSP__
 .endif
 
+# for multi-cpu machines, cpu_hatch() straddles the init of
+# __stack_chk_guard, so ensure stack protection is disabled
+.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64"
+COPTS.cpu.c+=		-fno-stack-protector
+.endif
+
 # If we want the bpendtsleep: label in kern_synch.c, we need to use
 # -fno-reorder-blocks.  Don't make this a config(1) defflag without
 # making sure this fragment remains valid.

Reply via email to