From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6213 invoked by alias); 3 Jun 2014 15:57:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6194 invoked by uid 89); 3 Jun 2014 15:57:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS,URIBL_BLACK autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 03 Jun 2014 15:57:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DB6B4116198; Tue, 3 Jun 2014 11:57:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vDZVS06ymdX9; Tue, 3 Jun 2014 11:57:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 76413116170; Tue, 3 Jun 2014 11:57:12 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BA5B940E74; Tue, 3 Jun 2014 08:57:13 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Alan Modra , Hans-Peter Nilsson , Tom Tromey Subject: [RFA v2] Make it easy to make --disable-werror the default for both binutils and gdb Date: Tue, 03 Jun 2014 15:57:00 -0000 Message-Id: <1401811030-22706-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2014-06/txt/msg00091.txt.bz2 Hello, This is V2 of the patch series. Hopefully, I incorporated all comments made so far. The changes compared to the previous version are: . Use "-a" instead of "&&" in the test expression; (H-P) . Fix the little thinko in one of bfd's ChangeLog (H-P) . Replace comment for "developement = " in development.sh to be completely neutral, just explaining the general intent of that variable (H-P and Alan) . Transition the gdb and gdbserver to using bfd's development.sh instead of keeping a separate one (Tom) . Adjusted various Makefiles to register the dependency on this file, so that a change there triggers a rebuild with the expected options (Joel). Note that gold/Makefile.am had no CONFIG_STATUS_DEPENDENCIES, so I added it, but only added developement.sh. It would be surprised if there weren't any other dependencies to be added there, but that should be done independently of this patch, so not done here. The patch was again tested various different ways, with developement both true and false, using both fresh builds as well as rebuilds after modifying development.sh. OK to push? Thanks! -- Joel ---------------------------------------------------------------------- The goal of this patch is to provide an easy way to make --disable-werror the default when building binutils, or the parts of binutils that need to get built when building GDB. In development mode, we want to continue making -Werror the default with GCC. But, when making releases, I think we want to make it as easy as possible for regular users to successfully build from sources. GDB already has this kind of feature to turn -Werror as well as the use of the libmcheck library. As GDB Release Manager, I take advantage of it to turn those off after having cut the branch. I'd like to be able to do the same for the binutils bits. And perhaps Tristan will want to do the same for his releases too (not sure, binutils builders might be a little savvier than GDB builders). This patch introduces a new file, called development.sh, which just sets a variable called $development. In our development branches (Eg. "master"), it's set to true. But setting it to false would allow us to change the default behavior of various development-related features to be turned off; in this case, it turns off the use of -Werror by default (use --enable-werror to turn it back on). bfd/ChangeLog: * development.sh: New file. * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh. Make -Werror the default with GCC only if DEVELOPMENT is true. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add $(srcdir)/development.sh. * Makefile.in, configure: Regenerate. binutils/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gas/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gold/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): New. * Makefile.in, configure: Regenerate. gprof/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. ld/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. opcodes/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gdb/ChangeLog: * development.sh: Delete. * Makefile.in (config.status): Adjust dependency on development.sh. * configure.ac: Adjust development.sh source call. * configure: Regenerate. gdb/gdbserver/ChangeLog: * configure.ac: Adjust development.sh source call. * Makefile.in (config.status): Adjust dependency on development.sh. * configure: Regenerate. Tested on x86_64-linux by building two ways: One with DEVELOPMENT set to true, and one with DEVELOPMENT set to false. In the first case, I could see the use of -Werror, while it disappeared in the second case. --- bfd/Makefile.am | 3 ++- bfd/Makefile.in | 3 ++- bfd/configure | 7 +++++-- bfd/development.sh | 19 +++++++++++++++++++ bfd/warning.m4 | 7 +++++-- binutils/Makefile.am | 3 ++- binutils/Makefile.in | 4 +++- binutils/configure | 7 +++++-- gas/Makefile.am | 4 +++- gas/Makefile.in | 5 ++++- gas/configure | 7 +++++-- gdb/Makefile.in | 2 +- gdb/configure | 2 +- gdb/configure.ac | 2 +- gdb/development.sh | 21 --------------------- gdb/gdbserver/Makefile.in | 2 +- gdb/gdbserver/configure | 2 +- gdb/gdbserver/configure.ac | 2 +- gold/Makefile.am | 2 ++ gold/Makefile.in | 1 + gold/configure | 7 +++++-- gprof/Makefile.am | 3 ++- gprof/Makefile.in | 4 +++- gprof/configure | 7 +++++-- ld/Makefile.am | 3 ++- ld/Makefile.in | 3 ++- ld/configure | 11 +++++++---- opcodes/Makefile.am | 3 ++- opcodes/Makefile.in | 4 +++- opcodes/configure | 7 +++++-- 30 files changed, 100 insertions(+), 57 deletions(-) create mode 100644 bfd/development.sh delete mode 100644 gdb/development.sh diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 2ba2180..595c489 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -741,7 +741,8 @@ OPTIONAL_BACKENDS_CFILES = \ CONFIG_STATUS_DEPENDENCIES = \ $(srcdir)/configure.in \ $(srcdir)/config.bfd \ - $(srcdir)/configure.host + $(srcdir)/configure.host \ + $(srcdir)/development.sh # These are defined by configure.in: WORDSIZE = @wordsize@ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 8a2764d..2ea8516 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -1045,7 +1045,8 @@ OPTIONAL_BACKENDS_CFILES = \ CONFIG_STATUS_DEPENDENCIES = \ $(srcdir)/configure.in \ $(srcdir)/config.bfd \ - $(srcdir)/configure.host + $(srcdir)/configure.host \ + $(srcdir)/development.sh # These are defined by configure.in: diff --git a/bfd/configure b/bfd/configure index b4f8653..f3df01c 100755 --- a/bfd/configure +++ b/bfd/configure @@ -12158,6 +12158,9 @@ fi +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12192,8 +12195,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/bfd/development.sh b/bfd/development.sh new file mode 100644 index 0000000..4c0f5b9 --- /dev/null +++ b/bfd/development.sh @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2014 Free Software Foundation, Inc. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Controls whether to enable development-mode features by default. +development=true diff --git a/bfd/warning.m4 b/bfd/warning.m4 index 28e9f8a..b1a8c7b 100644 --- a/bfd/warning.m4 +++ b/bfd/warning.m4 @@ -18,6 +18,9 @@ dnl . dnl AC_DEFUN([AM_BINUTILS_WARNINGS],[ +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow") @@ -39,8 +42,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/binutils/Makefile.am b/binutils/Makefile.am index 77c99d7..aca2610 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -514,7 +514,8 @@ all: info # We extract version from bfd/configure.in, make sure to rerun configure # when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak embedspu diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 52489f2..c9e9e38 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -616,7 +616,9 @@ EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ # We extract version from bfd/configure.in, make sure to rerun configure # when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh + DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak embedspu MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \ binutils.log binutils.sum abcdefgh* diff --git a/binutils/configure b/binutils/configure index fcf9784..1272e53 100755 --- a/binutils/configure +++ b/binutils/configure @@ -11592,6 +11592,9 @@ _ACEOF +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11626,8 +11629,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/gas/Makefile.am b/gas/Makefile.am index 01731b9..669ab19 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -693,4 +693,6 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(srcdir)/configure.tgt \ + $(BFDDIR)/development.sh diff --git a/gas/Makefile.in b/gas/Makefile.in index 184a926..2ca56df 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -677,7 +677,10 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core \ testsuite/site.exp site.bak site.exp stage stage1 stage2 against = stage2 -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(srcdir)/configure.tgt \ + $(BFDDIR)/development.sh + all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/gas/configure b/gas/configure index 2530377..1e1086f 100755 --- a/gas/configure +++ b/gas/configure @@ -11575,6 +11575,9 @@ fi using_cgen=no +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11609,8 +11612,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/gdb/Makefile.in b/gdb/Makefile.in index c189ea3..f4c7a7f 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1474,7 +1474,7 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status -config.status: $(srcdir)/configure configure.tgt configure.host development.sh +config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh $(SHELL) config.status --recheck ACLOCAL = aclocal diff --git a/gdb/configure b/gdb/configure index 56c92d3..05ebace 100755 --- a/gdb/configure +++ b/gdb/configure @@ -2714,7 +2714,7 @@ fi # Set the 'development' global. -. $srcdir/development.sh +. $srcdir/../bfd/development.sh ac_ext=c ac_cpp='$CPP $CPPFLAGS' diff --git a/gdb/configure.ac b/gdb/configure.ac index 903f378..138fc85 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -24,7 +24,7 @@ AC_CONFIG_HEADER(config.h:config.in) AM_MAINTAINER_MODE # Set the 'development' global. -. $srcdir/development.sh +. $srcdir/../bfd/development.sh AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS diff --git a/gdb/development.sh b/gdb/development.sh deleted file mode 100644 index 1c21efa..0000000 --- a/gdb/development.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2012-2014 Free Software Foundation, Inc. -# -# This file is part of GDB. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Set to 'true' for development snapshots, 'false' for releases and -# pre-releases. When true, provide more thorough testing with -# -lmcheck. -development=true diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index f773fa2..b795b38 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -390,7 +390,7 @@ $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status CONFIG_LINKS= \ $(SHELL) config.status -config.status: configure configure.srv $(srcdir)/../development.sh +config.status: configure configure.srv $(srcdir)/../../bfd/development.sh $(SHELL) ./config.status --recheck # automatic rebuilding in automake-generated Makefiles requires diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 101062f..62adc71 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -4324,7 +4324,7 @@ fi # Set the 'development' global. -. $srcdir/../development.sh +. $srcdir/../../bfd/development.sh # Enable -lmcheck by default (it provides cheap-enough memory # mangling), but turn it off for releases. diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 89a8eea..5a10ee7 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -41,7 +41,7 @@ AC_HEADER_STDC AC_FUNC_ALLOCA # Set the 'development' global. -. $srcdir/../development.sh +. $srcdir/../../bfd/development.sh # Enable -lmcheck by default (it provides cheap-enough memory # mangling), but turn it off for releases. diff --git a/gold/Makefile.am b/gold/Makefile.am index 78f0271..54393f9 100644 --- a/gold/Makefile.am +++ b/gold/Makefile.am @@ -197,6 +197,8 @@ dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADSLIB) \ $(LIBDL) dwp_LDFLAGS = $(GOLD_LDFLAGS) +CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh + # Use an explicit dependency for the bison generated header file. expression.$(OBJEXT): yyscript.h script-sections.$(OBJEXT): yyscript.h diff --git a/gold/Makefile.in b/gold/Makefile.in index 1ef3cce..579505a 100644 --- a/gold/Makefile.in +++ b/gold/Makefile.in @@ -564,6 +564,7 @@ dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADSLIB) \ $(LIBDL) dwp_LDFLAGS = $(GOLD_LDFLAGS) +CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh POTFILES = $(CCFILES) $(HFILES) $(TARGETSOURCES) @GCC_TRUE@@NATIVE_LINKER_TRUE@ld1_SOURCES = $(sources_var) @GCC_TRUE@@NATIVE_LINKER_TRUE@ld1_DEPENDENCIES = $(deps_var) gcctestdir1/ld diff --git a/gold/configure b/gold/configure index f61307b..6f53b22 100755 --- a/gold/configure +++ b/gold/configure @@ -6630,6 +6630,9 @@ fi +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6664,8 +6667,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/gprof/Makefile.am b/gprof/Makefile.am index 1db6951..2daefac 100644 --- a/gprof/Makefile.am +++ b/gprof/Makefile.am @@ -60,7 +60,8 @@ diststuff: $(BUILT_SOURCES) info $(man_MANS) # We extract version from bfd/configure.in, make sure to rerun configure # when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh # This empty rule is a hack against gmake patched by Apple. %.o:%.m diff --git a/gprof/Makefile.in b/gprof/Makefile.in index 3af41e8..1706ba7 100644 --- a/gprof/Makefile.in +++ b/gprof/Makefile.in @@ -325,7 +325,9 @@ EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS) # We extract version from bfd/configure.in, make sure to rerun configure # when BFD's version changes. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh + POTFILES = $(sources) $(noinst_HEADERS) MANCONF = -Dman TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) diff --git a/gprof/configure b/gprof/configure index 5a9c81e..3d6b415 100755 --- a/gprof/configure +++ b/gprof/configure @@ -12004,6 +12004,9 @@ fi +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12038,8 +12041,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi diff --git a/ld/Makefile.am b/ld/Makefile.am index 24ba3e1..44e7ca6 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -2057,7 +2057,8 @@ MAINTAINERCLEANFILES = configdoc.texi ld.1 # We want to reconfigure if configure.host or configure.tgt changes. We # extract version from bfd/configure.in, so we must depend on that also. CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \ - $(srcdir)/../bfd/configure.in + $(srcdir)/../bfd/configure.in \ + $(srcdir)/../bfd/development.sh MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum diff --git a/ld/Makefile.in b/ld/Makefile.in index 9dd4399..2582cea 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -888,7 +888,8 @@ MAINTAINERCLEANFILES = configdoc.texi ld.1 ld.info # We want to reconfigure if configure.host or configure.tgt changes. We # extract version from bfd/configure.in, so we must depend on that also. CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \ - $(srcdir)/../bfd/configure.in + $(srcdir)/../bfd/configure.in \ + $(srcdir)/../bfd/development.sh MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum diff --git a/ld/configure b/ld/configure index b6c3246..6dd7bc6 100755 --- a/ld/configure +++ b/ld/configure @@ -4642,6 +4642,9 @@ $as_echo "$ac_cv_path_EGREP" >&6; } +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4676,8 +4679,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi @@ -12193,7 +12196,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12196 "configure" +#line 12199 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12299,7 +12302,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12302 "configure" +#line 12305 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index de98c28..9ff6a38 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -296,7 +296,8 @@ OFILES = @BFD_MACHINES@ # We should reconfigure whenever bfd/configure.in changes, because # that's where the version number in Makefile comes from. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 5995f1c..f83f1d9 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -569,7 +569,9 @@ OFILES = @BFD_MACHINES@ # We should reconfigure whenever bfd/configure.in changes, because # that's where the version number in Makefile comes from. -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in \ + $(BFDDIR)/development.sh + AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c # It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD. diff --git a/opcodes/configure b/opcodes/configure index 9379bbf..40a2b85 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -11504,6 +11504,9 @@ esac fi +# Set the 'development' global. +. $srcdir/../bfd/development.sh + GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11538,8 +11541,8 @@ case "${host}" in *) ;; esac -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then ERROR_ON_WARNING=yes fi -- 1.9.1