This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[rfc] Check that GCC accepts the given -W option
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [rfc] Check that GCC accepts the given -W option
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 11 May 2000 22:03:23 +1000
- Organization: Cygnus Solutions
Hello,
The attatched tweeks the configury so that it checks that a -W option is
valid before trying to use it.
Look ok?
Andrew
Thu May 11 21:52:55 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (WERROR_CFLAGS): Check that GCC accepts a -W option
before using it.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.21
diff -p -r1.21 configure.in
*** configure.in 2000/04/14 10:13:50 1.21
--- configure.in 2000/05/11 11:54:05
*************** then
*** 509,515 ****
for w in ${build_warnings}; do
case $w in
-Werr*) WERROR_CFLAGS=-Werror ;;
! *) WARN_CFLAGS="${WARN_CFLAGS} $w"
esac
done
fi
--- 509,520 ----
for w in ${build_warnings}; do
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
esac
done
fi