aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2015-01-06 17:45:14 -0600
committerBrent Cook <busterb@gmail.com>2015-01-06 17:47:16 -0600
commitec81c28219b3d3234ddf0af12d0579efa1a3d2a6 (patch)
tree1ca8108d0ae7b66597515a811d93cb97753d668c
parentf2d68c7d21f11f3fa08ab821ccd4356fc863ccd4 (diff)
downloadportable-ec81c28219b3d3234ddf0af12d0579efa1a3d2a6.tar.gz
portable-ec81c28219b3d3234ddf0af12d0579efa1a3d2a6.tar.bz2
portable-ec81c28219b3d3234ddf0af12d0579efa1a3d2a6.zip
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.
-rw-r--r--configure.ac6
1 files 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], [
104 AC_LANG_ASSERT(C) 104 AC_LANG_ASSERT(C)
105 AC_MSG_CHECKING([if $saved_CC supports "$1"]) 105 AC_MSG_CHECKING([if $saved_CC supports "$1"])
106 old_cflags="$CFLAGS" 106 old_cflags="$CFLAGS"
107 CFLAGS=$1 107 CFLAGS="$1 -Wall -Werror"
108 AC_TRY_LINK([ 108 AC_TRY_LINK([
109 #include <stdio.h> 109 #include <stdio.h>
110 ], 110 ],
@@ -121,7 +121,7 @@ AC_DEFUN([CHECK_LDFLAG], [
121 AC_LANG_ASSERT(C) 121 AC_LANG_ASSERT(C)
122 AC_MSG_CHECKING([if $saved_LD supports "$1"]) 122 AC_MSG_CHECKING([if $saved_LD supports "$1"])
123 old_ldflags="$LDFLAGS" 123 old_ldflags="$LDFLAGS"
124 LDFLAGS=$1 124 LDFLAGS="$1 -Wall -Werror"
125 AC_TRY_LINK([ 125 AC_TRY_LINK([
126 #include <stdio.h> 126 #include <stdio.h>
127 ], 127 ],
@@ -151,7 +151,7 @@ AS_IF([test "x$enable_hardening" = "xyes"], [
151AS_IF([test "x$enable_hardening" = "xyes" -a "x$HOST_OS" != "xwin"], [ 151AS_IF([test "x$enable_hardening" = "xyes" -a "x$HOST_OS" != "xwin"], [
152 CHECK_CFLAG([[-fstack-protector-strong]], 152 CHECK_CFLAG([[-fstack-protector-strong]],
153 CHECK_CFLAG([[-fstack-protector-all]], 153 CHECK_CFLAG([[-fstack-protector-all]],
154 AC_MSG_ERROR([compiler does appear to support stack protection - use --disable-hardening to override]) 154 AC_MSG_WARN([compiler does not appear to support stack protection])
155 ) 155 )
156 ) 156 )
157]) 157])