Module Name:    src
Committed By:   martin
Date:           Tue Jan 28 19:41:52 UTC 2014

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

Log Message:
As discussed on tech-toolchain: untill gcc is fixed (or our ABI changed, ...)
make stack protection warnings non-fatal if using gcc 4.8 on sh3/m68k/vax.


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/share/mk/bsd.sys.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.236 src/share/mk/bsd.sys.mk:1.237
--- src/share/mk/bsd.sys.mk:1.236	Thu Jan 16 01:19:46 2014
+++ src/share/mk/bsd.sys.mk	Tue Jan 28 19:41:52 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.236 2014/01/16 01:19:46 christos Exp $
+#	$NetBSD: bsd.sys.mk,v 1.237 2014/01/28 19:41:52 martin Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -109,6 +109,19 @@ LINTFLAGS+=	${DESTDIR:D-d ${DESTDIR}/usr
 CPPFLAGS+=	-D_FORTIFY_SOURCE=2
 .endif
 COPTS+=	-fstack-protector -Wstack-protector 
+
+# gcc 4.8 on m68k erroneously does not protect functions with
+# variables needing special alignement, see
+#	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674
+# (the underlying issue for sh and vax may be different, needs more
+# investigation, symptoms are similar but for different sources)
+.if "${ACTIVE_CC}" == "gcc" && "${HAVE_GCC}" == "48" && \
+	( ${MACHINE_CPU} == "sh3" || \
+	  ${MACHINE_ARCH} == "vax" || \
+	  ${MACHINE_CPU} == "m68k" )
+COPTS+=	-Wno-error=stack-protector 
+.endif
+
 COPTS+=	${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
 COPTS+=	${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
 .endif

Reply via email to