From ec81c28219b3d3234ddf0af12d0579efa1a3d2a6 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 6 Jan 2015 17:45:14 -0600 Subject: [PATCH] catch GCC versions that only warn on unused flags Noticed while building with GCC 4.2 with HP-UX. Switching the ERROR to a WARN for a first release while we continue to survey the field. --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 2977703..54209da 100644 --- a/configure.ac +++ b/configure.ac @@ -104,7 +104,7 @@ AC_DEFUN([CHECK_CFLAG], [ AC_LANG_ASSERT(C) AC_MSG_CHECKING([if $saved_CC supports "$1"]) old_cflags="$CFLAGS" - CFLAGS=$1 + CFLAGS="$1 -Wall -Werror" AC_TRY_LINK([ #include ], @@ -121,7 +121,7 @@ AC_DEFUN([CHECK_LDFLAG], [ AC_LANG_ASSERT(C) AC_MSG_CHECKING([if $saved_LD supports "$1"]) old_ldflags="$LDFLAGS" - LDFLAGS=$1 + LDFLAGS="$1 -Wall -Werror" AC_TRY_LINK([ #include ], @@ -151,7 +151,7 @@ AS_IF([test "x$enable_hardening" = "xyes"], [ AS_IF([test "x$enable_hardening" = "xyes" -a "x$HOST_OS" != "xwin"], [ CHECK_CFLAG([[-fstack-protector-strong]], CHECK_CFLAG([[-fstack-protector-all]], - AC_MSG_ERROR([compiler does appear to support stack protection - use --disable-hardening to override]) + AC_MSG_WARN([compiler does not appear to support stack protection]) ) ) ])