Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Move the RELRO and the SANITIZER stuff outside of t...
details: https://anonhg.NetBSD.org/src/rev/daf0f6942ee7
branches: trunk
changeset: 319523:daf0f6942ee7
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 02 03:02:30 2018 +0000
description:
Move the RELRO and the SANITIZER stuff outside of the WARNS conditional!
diffstat:
share/mk/bsd.sys.mk | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diffs (57 lines):
diff -r 266354defb6b -r daf0f6942ee7 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Sat Jun 02 01:41:49 2018 +0000
+++ b/share/mk/bsd.sys.mk Sat Jun 02 03:02:30 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.278 2018/06/02 01:41:49 christos Exp $
+# $NetBSD: bsd.sys.mk,v 1.279 2018/06/02 03:02:30 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -70,13 +70,6 @@
CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wa,--fatal-warnings :}
.endif
-.if ${MKRELRO:Uno} != "no"
-LDFLAGS+= -Wl,-z,relro
-.endif
-.if ${MKRELRO:Uno} == "full"
-LDFLAGS+= -Wl,-z,now
-.endif
-
# Set linker warnings to be fatal
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
# XXX on linking static libs
@@ -89,12 +82,6 @@
.endif
.endif
-.if ${MKSANITIZER:Uno} == "yes"
-CFLAGS+= -fsanitize=${USE_SANITIZER}
-CXXFLAGS+= -fsanitize=${USE_SANITIZER}
-LDFLAGS+= -fsanitize=${USE_SANITIZER}
-.endif
-
LDFLAGS+= -Wl,--warn-shared-textrel
.if ${WARNS} > 1
@@ -135,6 +122,20 @@
.endif
.endif
+.if ${MKRELRO:Uno} != "no"
+LDFLAGS+= -Wl,-z,relro
+.endif
+.if ${MKRELRO:Uno} == "full"
+LDFLAGS+= -Wl,-z,now
+.endif
+
+.if ${MKSANITIZER:Uno} == "yes"
+CFLAGS+= -fsanitize=${USE_SANITIZER}
+CXXFLAGS+= -fsanitize=${USE_SANITIZER}
+LDFLAGS+= -fsanitize=${USE_SANITIZER}
+.endif
+
+
CWARNFLAGS+= ${CWARNFLAGS.${ACTIVE_CC}}
CPPFLAGS+= ${AUDIT:D-D__AUDIT__}
Home |
Main Index |
Thread Index |
Old Index