diff options
author | Ian Lance Taylor <iant@google.com> | 1999-07-11 21:26:49 +0400 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 1999-07-11 21:26:49 +0400 |
commit | 9930fb5b1e6d316a4a0ab53fbbb17046108a1e4e (patch) | |
tree | f91295f4bd20614cae7646ecef04c63c829f6d64 | |
parent | 192e3343c375358bd91ab2d0b35958cc104cfc7c (diff) |
* configure: Add -W -Wall to the default CFLAGS when compiling with
gcc.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | configure | 15 |
2 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,8 @@ +1999-07-11 Ian Lance Taylor <ian@zembu.com> + + * configure: Add -W -Wall to the default CFLAGS when compiling with + gcc. + Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> * configure.in: Build ld, binutils & gas for hppa*-*-linux-gnu*. @@ -3,7 +3,7 @@ ### WARNING: this file contains embedded tabs. Do not run untabify on this file. # Configuration script -# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 1997 +# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -902,6 +902,9 @@ do test -n "$DEFAULT_LEX" && break done +# BINUTILS LOCAL: This is included in the default CFLAGS when using gcc. +warn_cflags="-W -Wall" + if [ "${build}" != "${host}" ]; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -935,7 +938,7 @@ t loop AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as} BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXX=${CXX-${host_alias}-c++} CXXFLAGS=${CXXFLAGS-"-g -O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} @@ -1015,10 +1018,10 @@ else CC="gcc" echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2"} + CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* @@ -1035,10 +1038,10 @@ else *gcc) echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2"} + CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* |