From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5070 invoked by alias); 14 Apr 2005 05:29:05 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 4828 invoked from network); 14 Apr 2005 05:28:47 -0000 Received: from unknown (HELO gizmo06bw.bigpond.com) (144.140.70.41) by sourceware.org with SMTP; 14 Apr 2005 05:28:47 -0000 Received: (qmail 3561 invoked from network); 14 Apr 2005 05:28:44 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo06bw.bigpond.com with SMTP; 14 Apr 2005 05:28:44 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by bwmam12.bigpond.com(MAM REL_3_4_2a 189/56615155) with SMTP id 56615155; Thu, 14 Apr 2005 15:28:44 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id B0D501A3266; Thu, 14 Apr 2005 14:58:43 +0930 Date: Thu, 14 Apr 2005 05:29:00 -0000 From: Alan Modra To: binutils@sources.redhat.com Subject: Re: housekeeping, -Wno-error Message-ID: <20050414052843.GE5968@bubble.modra.org> Mail-Followup-To: binutils@sources.redhat.com References: <20050412025055.GC3321@bubble.modra.org> <20050412043621.GA27008@lucon.org> <20050412054212.GD3321@bubble.modra.org> <425B8860.6050403@redhat.com> <20050412114139.GF3321@bubble.modra.org> <425D3BC5.7050204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425D3BC5.7050204@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2005-04/txt/msg00359.txt.bz2 On Wed, Apr 13, 2005 at 04:33:25PM +0100, Nick Clifton wrote: > This seems like a very good approach. Would you consider applying it to > the relevant Makefile.am(s) please ? Done. The thing that was stopping me from committing was not being able to use ../bfd/warning.m4 in binutils/ and ld/, which both still use the old 2.13 autotools. I eventually punted on getting that working, and just expanded the file in place. bfd/ * Makefile.am (NO_WERROR): Define. * warning.m4: New file * acinclude.m4: Include warning.m4. * configure.in: Invoke AM_BINUTILS_WARNINGS. * Makefile.in: Regenerate. * configure: Regenerate. bfd/doc/ * Makefile.in: Regenerate. binutils/ * Makefile.am (NO_WERROR): Define. Use instead of -Wno-error. * configure.in: Include ../bfd/warning.m4 contents. * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. gas/ * Makefile.am (NO_WERROR): Define. Use instead of -Wno-error. * acinclude.m4: Include ../bfd/warning.m4. * configure.in: Invoke AM_BINUTILS_WARNINGS. * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. gprof/ * Makefile.am (NO_WERROR): Define. * acinclude.m4: Include ../bfd/warning.m4. * configure.in: Invoke AM_BINUTILS_WARNINGS. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. ld/ * Makefile.am (NO_WERROR): Define. Use instead of -Wno-error. * configure.in: Include ../bfd/warning.m4 contents. * Makefile.in: Regenerate. * configure: Regenerate. opcodes/ * Makefile.am (NO_WERROR): Define. * configure.in: Invoke AM_BINUTILS_WARNINGS. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. =================================================================== RCS file: /cvs/src/src/bfd/Makefile.am,v retrieving revision 1.151 diff -u -p -r1.151 Makefile.am --- bfd/Makefile.am 12 Apr 2005 02:50:24 -0000 1.151 +++ bfd/Makefile.am 14 Apr 2005 04:46:31 -0000 @@ -18,6 +18,7 @@ bfdincludedir = @bfdincludedir@ bfdlib_LTLIBRARIES = libbfd.la WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) # bfd.h goes here, for now Index: bfd/warning.m4 =================================================================== RCS file: bfd/warning.m4 diff -N bfd/warning.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bfd/warning.m4 14 Apr 2005 05:09:42 -0000 @@ -0,0 +1,43 @@ +dnl Common configure.in fragment + +AC_DEFUN([AM_BINUTILS_WARNINGS],[ +WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" + +AC_ARG_ENABLE(werror, + [ --enable-werror treat compile warnings as errors], + [case "${enableval}" in + yes | y) ERROR_ON_WARNING="yes" ;; + no | n) ERROR_ON_WARNING="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; + esac]) + +# Enable -Werror by default when using gcc +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + ERROR_ON_WARNING=yes +fi + +NO_WERROR= +if test "${ERROR_ON_WARNING}" = yes ; then + WARN_CFLAGS="$WARN_CFLAGS -Werror" + NO_WERROR="-Wno-error" +fi + +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings], +[case "${enableval}" in + yes) ;; + no) WARN_CFLAGS="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + WARN_CFLAGS="${WARN_CFLAGS} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + WARN_CFLAGS="${t} ${WARN_CFLAGS}";; + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac]) + +if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then + echo "Setting warning flags = $WARN_CFLAGS" 6>&1 +fi + +AC_SUBST(WARN_CFLAGS) +AC_SUBST(NO_WERROR) +]) Index: bfd/acinclude.m4 =================================================================== RCS file: /cvs/src/src/bfd/acinclude.m4,v retrieving revision 1.13 diff -u -p -r1.13 acinclude.m4 --- bfd/acinclude.m4 15 Jan 2005 19:14:54 -0000 1.13 +++ bfd/acinclude.m4 14 Apr 2005 04:46:32 -0000 @@ -1,6 +1,7 @@ sinclude(../config/accross.m4) sinclude(../config/acx.m4) sinclude(../bfd/bfd.m4) +sinclude(../bfd/warning.m4) dnl See whether we need to use fopen-bin.h rather than fopen-same.h. AC_DEFUN([BFD_BINARY_FOPEN], Index: bfd/configure.in =================================================================== RCS file: /cvs/src/src/bfd/configure.in,v retrieving revision 1.174 diff -u -p -r1.174 configure.in --- bfd/configure.in 5 Apr 2005 07:58:38 -0000 1.174 +++ bfd/configure.in 14 Apr 2005 04:46:41 -0000 @@ -51,42 +51,7 @@ AC_ARG_WITH(mmap, *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; esac],[want_mmap=false])dnl -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - -AC_ARG_ENABLE(werror, - [ --enable-werror treat compile warnings as errors], - [case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; - esac]) - -# Enable -Werror by default, suppressing it only for --disable-werror -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" -fi - -AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], -[case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then - WARN_CFLAGS="${build_warnings}" -fi -AC_SUBST(WARN_CFLAGS) +AM_BINUTILS_WARNINGS AM_CONFIG_HEADER(config.h:config.in) Index: binutils/Makefile.am =================================================================== RCS file: /cvs/src/src/binutils/Makefile.am,v retrieving revision 1.56 diff -u -p -r1.56 Makefile.am --- binutils/Makefile.am 12 Apr 2005 02:50:25 -0000 1.56 +++ binutils/Makefile.am 14 Apr 2005 04:46:44 -0000 @@ -20,6 +20,7 @@ YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) # these two are almost the same program @@ -245,21 +246,21 @@ sysinfo.h: sysinfo.c # Disable -Werror, if it has been enabled, since old versions of bison/ # yacc will produce working code which contain compile time warnings. arparse.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) arlex.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) sysroff.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) defparse.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) deflex.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) nlmheader.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) rcparse.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) rclex.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) Index: binutils/configure.in =================================================================== RCS file: /cvs/src/src/binutils/configure.in,v retrieving revision 1.50 diff -u -p -r1.50 configure.in --- binutils/configure.in 6 Apr 2005 14:45:54 -0000 1.50 +++ binutils/configure.in 14 Apr 2005 04:46:48 -0000 @@ -29,7 +29,10 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; esac])dnl -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +dnl FIXME: The following is bfd/warning.m4 contents expanded +dnl When converting to current autotools, please replace with +dnl AM_BINUTILS_WARNINGS +WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_ARG_ENABLE(werror, [ --enable-werror treat compile warnings as errors], @@ -39,32 +42,35 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Werror by default, suppressing it only for --disable-werror -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" +# Enable -Werror by default when using gcc +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + ERROR_ON_WARNING=yes fi +NO_WERROR= +if test "${ERROR_ON_WARNING}" = yes ; then + WARN_CFLAGS="$WARN_CFLAGS -Werror" + NO_WERROR="-Wno-error" +fi + AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[ --enable-build-warnings Enable build-time compiler warnings], [case "${enableval}" in yes) ;; - no) build_warnings="-w";; + no) WARN_CFLAGS="-w";; ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; + WARN_CFLAGS="${WARN_CFLAGS} ${t}";; *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then - WARN_CFLAGS="${build_warnings}" + WARN_CFLAGS="${t} ${WARN_CFLAGS}";; + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac]) + +if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then + echo "Setting warning flags = $WARN_CFLAGS" 6>&1 fi + AC_SUBST(WARN_CFLAGS) +AC_SUBST(NO_WERROR) AM_CONFIG_HEADER(config.h:config.in) Index: gas/Makefile.am =================================================================== RCS file: /cvs/src/src/gas/Makefile.am,v retrieving revision 1.106 diff -u -p -r1.106 Makefile.am --- gas/Makefile.am 12 Apr 2005 08:42:37 -0000 1.106 +++ gas/Makefile.am 14 Apr 2005 04:47:06 -0000 @@ -16,6 +16,7 @@ YACC = `if [ -f ../bison/bison ] ; then LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) MKDEP = gcc -MM @@ -644,7 +645,7 @@ m68k-parse.c: $(srcdir)/config/m68k-pars # Disable -Werror, if it has been enabled, since old versions of bison/ # yacc will produce working code which contain compile time warnings. m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) # Don't let the .y.h rule clobber m68k-parse.h. m68k-parse.h: ; @true @@ -658,7 +659,7 @@ itbl-lex.o: itbl-lex.c itbl-parse.h $(sr # Disable -Werror, if it has been enabled, since old versions of bison/ # yacc will produce working code which contain compile time warnings. itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h Index: gas/acinclude.m4 =================================================================== RCS file: /cvs/src/src/gas/acinclude.m4,v retrieving revision 1.3 diff -u -p -r1.3 acinclude.m4 --- gas/acinclude.m4 14 Jan 2004 13:41:37 -0000 1.3 +++ gas/acinclude.m4 14 Apr 2005 04:47:07 -0000 @@ -1,3 +1,5 @@ +sinclude(../bfd/warning.m4) + dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers) AC_DEFUN([GAS_CHECK_DECL_NEEDED],[ AC_MSG_CHECKING(whether declaration is required for $1) Index: gprof/Makefile.am =================================================================== RCS file: /cvs/src/src/gprof/Makefile.am,v retrieving revision 1.22 diff -u -p -r1.22 Makefile.am --- gprof/Makefile.am 30 Nov 2004 17:20:48 -0000 1.22 +++ gprof/Makefile.am 14 Apr 2005 05:03:35 -0000 @@ -11,6 +11,7 @@ BFDDIR = $(BASEDIR)/bfd INCDIR = $(BASEDIR)/include WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) MKDEP = gcc -MM Index: gprof/configure.in =================================================================== RCS file: /cvs/src/src/gprof/configure.in,v retrieving revision 1.25 diff -u -p -r1.25 configure.in --- gprof/configure.in 6 Apr 2005 15:42:14 -0000 1.25 +++ gprof/configure.in 14 Apr 2005 04:47:25 -0000 @@ -42,42 +42,7 @@ if test $gprof_cv_decl_getopt_unistd_h = [Is the prototype for getopt in in the expected format?]) fi -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - -AC_ARG_ENABLE(werror, - [ --enable-werror treat compile warnings as errors], - [case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; - esac]) - -# Enable -Werror by default, suppressing it only for --disable-werror -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" -fi - -AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], -[case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then - WARN_CFLAGS="${build_warnings}" -fi -AC_SUBST(WARN_CFLAGS) +AM_BINUTILS_WARNINGS AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]]) Index: ld/Makefile.am =================================================================== RCS file: /cvs/src/src/ld/Makefile.am,v retrieving revision 1.171 diff -u -p -r1.171 Makefile.am --- ld/Makefile.am 12 Apr 2005 02:50:28 -0000 1.171 +++ ld/Makefile.am 14 Apr 2005 04:47:26 -0000 @@ -14,6 +14,7 @@ YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. @@ -420,11 +421,11 @@ STAGESTUFF = *.o ldscripts/* e*.c # Disable -Werror, if it has been enabled, since old versions of bison/ # yacc will produce working code which contain compile time warnings. ldgram.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) ldlex.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) deffilep.o: - $(COMPILE) -c $< -Wno-error + $(COMPILE) -c $< $(NO_WERROR) # At the moment this is just a list of those emulation template files # that contain internationalised strings. Index: ld/configure.in =================================================================== RCS file: /cvs/src/src/ld/configure.in,v retrieving revision 1.29 diff -u -p -r1.29 configure.in --- ld/configure.in 4 Apr 2005 11:27:14 -0000 1.29 +++ ld/configure.in 14 Apr 2005 04:47:32 -0000 @@ -66,7 +66,10 @@ AC_SUBST(use_sysroot) AC_SUBST(TARGET_SYSTEM_ROOT) AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +dnl FIXME: The following is bfd/warning.m4 contents expanded +dnl When converting to current autotools, please replace with +dnl AM_BINUTILS_WARNINGS +WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_ARG_ENABLE(werror, [ --enable-werror treat compile warnings as errors], @@ -76,32 +79,35 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Werror by default, suppressing it only for --disable-werror -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" +# Enable -Werror by default when using gcc +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + ERROR_ON_WARNING=yes fi +NO_WERROR= +if test "${ERROR_ON_WARNING}" = yes ; then + WARN_CFLAGS="$WARN_CFLAGS -Werror" + NO_WERROR="-Wno-error" +fi + AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings enable build-time compiler warnings if gcc is used], +[ --enable-build-warnings Enable build-time compiler warnings], [case "${enableval}" in yes) ;; - no) build_warnings="-w";; + no) WARN_CFLAGS="-w";; ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; + WARN_CFLAGS="${WARN_CFLAGS} ${t}";; *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then - WARN_CFLAGS="${build_warnings}" + WARN_CFLAGS="${t} ${WARN_CFLAGS}";; + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac]) + +if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then + echo "Setting warning flags = $WARN_CFLAGS" 6>&1 fi + AC_SUBST(WARN_CFLAGS) +AC_SUBST(NO_WERROR) AM_CONFIG_HEADER(config.h:config.in) Index: opcodes/Makefile.am =================================================================== RCS file: /cvs/src/src/opcodes/Makefile.am,v retrieving revision 1.81 diff -u -p -r1.81 Makefile.am --- opcodes/Makefile.am 21 Feb 2005 11:48:33 -0000 1.81 +++ opcodes/Makefile.am 14 Apr 2005 04:47:37 -0000 @@ -9,6 +9,7 @@ BFDDIR = $(srcdir)/../bfd MKDEP = gcc -MM WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ AM_CFLAGS = $(WARN_CFLAGS) bfdlibdir = @bfdlibdir@ Index: opcodes/configure.in =================================================================== RCS file: /cvs/src/src/opcodes/configure.in,v retrieving revision 1.53 diff -u -p -r1.53 configure.in --- opcodes/configure.in 31 Mar 2005 16:52:54 -0000 1.53 +++ opcodes/configure.in 14 Apr 2005 04:47:44 -0000 @@ -44,42 +44,7 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;; esac])dnl -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - -AC_ARG_ENABLE(werror, - [ --enable-werror treat compile warnings as errors], - [case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; - esac]) - -# Enable -Werror by default, suppressing it only for --disable-werror -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" -fi - -AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], -[case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 -fi])dnl -WARN_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then - WARN_CFLAGS="${build_warnings}" -fi -AC_SUBST(WARN_CFLAGS) +AM_BINUTILS_WARNINGS AM_CONFIG_HEADER(config.h:config.in) -- Alan Modra IBM OzLabs - Linux Technology Centre