enable -Wwrite-strings for gas
[deliverable/binutils-gdb.git] / gas / configure
index 11e6ed436a1d23f655866368fa24e86fedf2ce7a..131dd2d22f4a60988ffbeb149b2973f9c1d79036 100755 (executable)
@@ -640,6 +640,7 @@ target_cpu_type
 extra_objects
 cgen_cpu_prefix
 GDBINIT
+WARN_WRITE_STRINGS
 NO_WERROR
 WARN_CFLAGS
 OTOOL64
@@ -10978,7 +10979,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10981 "configure"
+#line 10982 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11084,7 +11085,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11087 "configure"
+#line 11088 "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 :
@@ -11805,6 +11820,7 @@ fi
 
 
 
+
 # Generate a header file
 ac_config_headers="$ac_config_headers config.h:config.in"
 
This page took 0.025077 seconds and 4 git commands to generate.