X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fconfigure;h=4c308cb2c6853d9aa5561d13af3fbd079b316cc5;hb=7544db951abbb5dca5373dcc7ae83ed60c0782ad;hp=249a39975b027e6fad0f550282e8df2a3aa4ddb9;hpb=a4e22a5df64a46bc99f737a982c0b9d1e8a45e2b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure b/gdb/configure index 249a39975b..4c308cb2c6 100755 --- a/gdb/configure +++ b/gdb/configure @@ -14376,14 +14376,23 @@ $as_echo_n "checking compiler warning flags... " >&6; } # Separate out the -Werror flag as some files just cannot be # compiled with it enabled. for w in ${build_warnings}; do + # GCC does not complain about -Wno-unknown-warning. Invert + # and test -Wunknown-warning instead. + case $w in + -Wno-*) + wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; + *) + wtest=$w ;; + esac + case $w in -Werr*) WERROR_CFLAGS=-Werror ;; *) # Check whether GCC accepts it. saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $w" + CFLAGS="$CFLAGS $wtest" saved_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $w" + CXXFLAGS="$CXXFLAGS $wtest" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */