enable -Wwrite-strings for gas
[deliverable/binutils-gdb.git] / ld / configure
index 572faa7d18f7b83c94b6d343627ae903093e581a..24f9316155cc427f99a629cb4a2c5eec84d33238 100755 (executable)
@@ -644,6 +644,7 @@ INCINTL
 LIBINTL_DEP
 LIBINTL
 USE_NLS
+WARN_WRITE_STRINGS
 NO_WERROR
 WARN_CFLAGS
 installed_linker
@@ -11716,7 +11717,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11719 "configure"
+#line 11720 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11822,7 +11823,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11825 "configure"
+#line 11826 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 rm -f conftest*
 
 
+# Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
+WARN_WRITE_STRINGS=""
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  WARN_WRITE_STRINGS="-Wwrite-strings"
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
@@ -15632,6 +15647,7 @@ fi
 
 
 
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
 $as_echo_n "checking for LC_MESSAGES... " >&6; }
 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
This page took 0.026961 seconds and 4 git commands to generate.