diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rwxr-xr-x | gdb/configure | 13 | ||||
-rw-r--r-- | gdb/configure.ac | 13 | ||||
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 13 | ||||
-rw-r--r-- | gdb/gdbserver/configure.ac | 13 |
6 files changed, 56 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fcb0e30..4d75eea 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2015-12-16 Pedro Alves <palves@redhat.com> + * configure.ac (compiler warning flags): When testing a + -Wno-foo option, check whether -Wfoo works instead. + * configure: Regenerate. + +2015-12-16 Pedro Alves <palves@redhat.com> + * common/vec.h (vec_offset): New macro. (DEF_VEC_ALLOC_FUNC_I, DEF_VEC_ALLOC_FUNC_O): Use it instead of offsetof. diff --git a/gdb/configure b/gdb/configure index 249a399..4c308cb 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. */ diff --git a/gdb/configure.ac b/gdb/configure.ac index ebd797b..b9d8f8b 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2007,14 +2007,23 @@ then # 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" AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) CFLAGS="$saved_CFLAGS" CXXFLAGS="$saved_CXXFLAGS" diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 63bb250..d54bb74 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2015-12-16 Pedro Alves <palves@redhat.com> + + * configure.ac (compiler warning flags): When testing a + -Wno-foo option, check whether -Wfoo works instead. + * configure: Regenerate. + 2015-12-11 Don Breazeal <donb@codesourcery.com> * server.c (process_serial_event): Don't exit from gdbserver diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index ccb9639..ab03cac 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -6148,14 +6148,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. */ diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 5524a05..6caf91c 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -193,14 +193,23 @@ then # 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" AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) CFLAGS="$saved_CFLAGS" CXXFLAGS="$saved_CXXFLAGS" |