diff options
author | Alan Modra <amodra@gmail.com> | 2010-04-07 07:19:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-04-07 07:19:02 +0000 |
commit | d1a98e0c8c56d6f2adfc6ae1a8699752e1c75774 (patch) | |
tree | dd007a68bc34a312aa09d58e0cb32f06e783ee59 /bfd/configure | |
parent | 937502b8a9923fccdded4b25c900fdf1e64d2480 (diff) | |
download | gdb-d1a98e0c8c56d6f2adfc6ae1a8699752e1c75774.zip gdb-d1a98e0c8c56d6f2adfc6ae1a8699752e1c75774.tar.gz gdb-d1a98e0c8c56d6f2adfc6ae1a8699752e1c75774.tar.bz2 |
* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
* configure: Regenerate.
Diffstat (limited to 'bfd/configure')
-rwxr-xr-x | bfd/configure | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bfd/configure b/bfd/configure index 0f73da3..f4aba27 100755 --- a/bfd/configure +++ b/bfd/configure @@ -12128,7 +12128,19 @@ fi -GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" +GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +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 + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow" +fi +rm -f conftest* + # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : @@ -12140,7 +12152,7 @@ if test "${enable_werror+set}" = set; then : fi -# Enable -Wno-format by default when using gcc on mingw +# Disable -Wformat by default when using gcc on mingw case "${host}" in *-*-mingw32*) if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then |