diff options
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index 29518ec..812e6bb 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -746,11 +746,10 @@ then case $w in -Werr*) WERROR_CFLAGS=-Werror ;; *) # Check that GCC accepts it - if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then - : - else - WARN_CFLAGS="${WARN_CFLAGS} $w" - fi + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) + CFLAGS="$saved_CFLAGS" esac done AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS}) |