This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[rfc] Check that GCC accepts the given -W option


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]