Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk As discussed on tech-toolchain: untill gcc is fixed...
details: https://anonhg.NetBSD.org/src/rev/021b81850ef7
branches: trunk
changeset: 793153:021b81850ef7
user: martin <martin%NetBSD.org@localhost>
date: Tue Jan 28 19:41:52 2014 +0000
description:
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.
diffstat:
share/mk/bsd.sys.mk | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 8f8ed3a38da0 -r 021b81850ef7 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Tue Jan 28 19:26:32 2014 +0000
+++ b/share/mk/bsd.sys.mk Tue Jan 28 19:41:52 2014 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index