Add LDFLAGS_WARNINGS_ARE_ERRORS.
--- a/make/autoconf/flags-cflags.m4 Thu Mar 01 11:22:31 2018 +0100
+++ b/make/autoconf/flags-cflags.m4 Thu Mar 01 14:31:04 2018 +0100
@@ -179,6 +179,7 @@
AC_SUBST(WARNINGS_AS_ERRORS)
+ LDFLAGS_WARNINGS_ARE_ERRORS=""
case "${TOOLCHAIN_TYPE}" in
microsoft)
DISABLE_WARNING_PREFIX="-wd"
@@ -187,6 +188,7 @@
solstudio)
DISABLE_WARNING_PREFIX="-erroff="
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
+ LDFLAGS_WARNINGS_ARE_ERRORS="-Wl,-z,fatal-warnings"
;;
gcc)
# Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
@@ -234,6 +236,7 @@
AC_SUBST(DISABLE_WARNING_PREFIX)
AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
+ AC_SUBST(LDFLAGS_WARNINGS_ARE_ERRORS)
])
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
--- a/make/autoconf/spec.gmk.in Thu Mar 01 11:22:31 2018 +0100
+++ b/make/autoconf/spec.gmk.in Thu Mar 01 14:31:04 2018 +0100
@@ -418,6 +418,7 @@
DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
+LDFLAGS_WARNINGS_ARE_ERRORS:=@LDFLAGS_WARNINGS_ARE_ERRORS@
# A global flag (true or false) determining if native warnings are considered errors.
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
--- a/make/common/NativeCompilation.gmk Thu Mar 01 11:22:31 2018 +0100
+++ b/make/common/NativeCompilation.gmk Thu Mar 01 14:31:04 2018 +0100
@@ -599,6 +599,7 @@
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true)
$1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
$1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
+ $1_EXTRA_LDFLAGS += $(LDFLAGS_WARNINGS_ARE_ERRORS)
endif
ifeq (NONE, $$($1_OPTIMIZATION))