diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-19 21:48:35 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-31 07:30:56 -0400 |
commit | 6757cf57697d30c73f4e3f314883ad2d8999eac6 (patch) | |
tree | ce9bd791ba49b4cb58f277209d52f7e7793edb13 /gold | |
parent | e4a0c708776681a6839c4335f999e45251e7b991 (diff) | |
download | gdb-6757cf57697d30c73f4e3f314883ad2d8999eac6.zip gdb-6757cf57697d30c73f4e3f314883ad2d8999eac6.tar.gz gdb-6757cf57697d30c73f4e3f314883ad2d8999eac6.tar.bz2 |
enable -Wwrite-strings for gas
We add a new AC_SUBST to warning.m4 so that the test if the warning is
supported is centralized, but the warning can be enabled per directory.
binutils/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
gprof/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
ld/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
opcodes/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
bfd/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
* warning.m4: Add WARN_WRITE_STRINGS AC_SUBST.
gold/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* configure: Regenerate.
gas/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* Makefile.am: Add WARN_WRITE_STRINGS to WARN_CFLAGS.
* Makefile.in: Regenerate.
* configure: Likewise.
Diffstat (limited to 'gold')
-rwxr-xr-x | gold/configure | 16 |
1 files changed, 16 insertions, 0 deletions
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//'` |