aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbfd/configure20
-rw-r--r--bfd/warning.m44
-rwxr-xr-xbinutils/configure20
-rw-r--r--gas/Makefile.am2
-rw-r--r--gas/Makefile.in2
-rwxr-xr-xgas/configure20
-rwxr-xr-xgold/configure16
-rwxr-xr-xgprof/configure20
-rwxr-xr-xld/configure20
-rwxr-xr-xopcodes/configure20
10 files changed, 130 insertions, 14 deletions
diff --git a/bfd/configure b/bfd/configure
index d03b996..51581ba 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -657,6 +657,7 @@ GENINSRC_NEVER_TRUE
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS
REPORT_BUGS_TEXI
@@ -11421,7 +11422,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11424 "configure"
+#line 11425 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11527,7 +11528,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11530 "configure"
+#line 11531 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12254,6 +12255,20 @@ fi
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 :
@@ -12314,6 +12329,7 @@ fi
+
ac_config_headers="$ac_config_headers config.h:config.in"
diff --git a/bfd/warning.m4 b/bfd/warning.m4
index 028d079..4c5b55d 100644
--- a/bfd/warning.m4
+++ b/bfd/warning.m4
@@ -30,6 +30,9 @@ AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
+# Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
+WARN_WRITE_STRINGS=""
+AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],
@@ -84,4 +87,5 @@ fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(NO_WERROR)
+ AC_SUBST(WARN_WRITE_STRINGS)
])
diff --git a/binutils/configure b/binutils/configure
index 6ff4708..0e88476 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -650,6 +650,7 @@ LEX_OUTPUT_ROOT
LEX
YFLAGS
YACC
+WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS
OTOOL64
@@ -11221,7 +11222,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11224 "configure"
+#line 11225 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11327,7 +11328,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11330 "configure"
+#line 11331 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11972,6 +11973,20 @@ fi
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 :
@@ -12032,6 +12047,7 @@ fi
+
ac_config_headers="$ac_config_headers config.h:config.in"
diff --git a/gas/Makefile.am b/gas/Makefile.am
index 36ef7ed..596e469 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -37,7 +37,7 @@ LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
am__skiplex =
am__skipyacc =
-WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
diff --git a/gas/Makefile.in b/gas/Makefile.in
index c407d72..0d1065f 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -232,7 +232,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
-WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@
XGETTEXT = @XGETTEXT@
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
YFLAGS = @YFLAGS@
diff --git a/gas/configure b/gas/configure
index 11e6ed4..131dd2d 100755
--- a/gas/configure
+++ b/gas/configure
@@ -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
@@ -11745,6 +11746,20 @@ fi
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"
diff --git a/gold/configure b/gold/configure
index 7fe771c..d0cfc95 100755
--- a/gold/configure
+++ b/gold/configure
@@ -607,6 +607,7 @@ LFS_CFLAGS
GOLD_LDADD
GOLD_LDFLAGS
WARN_CXXFLAGS
+WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS
IFUNC_STATIC_FALSE
@@ -6718,6 +6719,20 @@ fi
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 :
@@ -6778,6 +6793,7 @@ fi
+
WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//' -e 's/-Wshadow//'`
diff --git a/gprof/configure b/gprof/configure
index 77bfe7f..5b8fbd7 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS
GENINSRC_NEVER_FALSE
@@ -10897,7 +10898,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10900 "configure"
+#line 10901 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11003,7 +11004,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11006 "configure"
+#line 11007 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12128,6 +12129,20 @@ fi
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 :
@@ -12193,6 +12208,7 @@ fi
+
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
cat >confcache <<\_ACEOF
diff --git a/ld/configure b/ld/configure
index 572faa7..24f9316 100755
--- a/ld/configure
+++ b/ld/configure
@@ -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
@@ -15571,6 +15572,20 @@ fi
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 :
diff --git a/opcodes/configure b/opcodes/configure
index da03f50..747c939 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -641,6 +641,7 @@ MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
NO_WMISSING_FIELD_INITIALIZERS
+WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS
OTOOL64
@@ -11146,7 +11147,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11149 "configure"
+#line 11150 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11252,7 +11253,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11255 "configure"
+#line 11256 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11535,6 +11536,20 @@ fi
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 :
@@ -11594,6 +11609,7 @@ fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'