aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2014-05-19 14:46:01 -0700
committerJoel Brobecker <brobecker@adacore.com>2014-06-05 05:47:29 -0700
commit270c9937446ca5273caf7fb102bcdba9ed7cff41 (patch)
tree95ce40cb57984c812efb1197ac89aeb806610824 /opcodes
parenta872e241e2c2d23f3b14bc122cea6adc05a40d25 (diff)
downloadgdb-270c9937446ca5273caf7fb102bcdba9ed7cff41.zip
gdb-270c9937446ca5273caf7fb102bcdba9ed7cff41.tar.gz
gdb-270c9937446ca5273caf7fb102bcdba9ed7cff41.tar.bz2
Make it easy to make --disable-werror the default for both binutils and gdb
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.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/Makefile.am3
-rw-r--r--opcodes/Makefile.in4
-rwxr-xr-xopcodes/configure7
4 files changed, 16 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index ce5a204..499ec64 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-05 Joel Brobecker <brobecker@adacore.com>
+
+ * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
+ bfd's development.sh.
+ * Makefile.in, configure: Regenerate.
+
2014-06-03 Nick Clifton <nickc@redhat.com>
* msp430-dis.c (msp430_doubleoperand): Use extension_word to
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