diff options
author | Joel Brobecker <brobecker@adacore.com> | 2014-05-19 14:46:01 -0700 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2014-06-05 05:47:29 -0700 |
commit | 270c9937446ca5273caf7fb102bcdba9ed7cff41 (patch) | |
tree | 95ce40cb57984c812efb1197ac89aeb806610824 /gdb | |
parent | a872e241e2c2d23f3b14bc122cea6adc05a40d25 (diff) | |
download | gdb-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 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rwxr-xr-x | gdb/configure | 2 | ||||
-rw-r--r-- | gdb/configure.ac | 2 | ||||
-rw-r--r-- | gdb/development.sh | 21 | ||||
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 2 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 2 | ||||
-rw-r--r-- | gdb/gdbserver/configure.ac | 2 |
9 files changed, 20 insertions, 27 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 719ae72..1fd19f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2014-06-05 Joel Brobecker <brobecker@adacore.com> + + * development.sh: Delete. + * Makefile.in (config.status): Adjust dependency on development.sh. + * configure.ac: Adjust development.sh source call. + * configure: Regenerate. + 2014-06-04 Doug Evans <xdje42@gmail.com> * guile/scm-breakpoint.c (struct gdbscm_breakpoint_object): New members diff --git a/gdb/Makefile.in b/gdb/Makefile.in index e6c6c33..ea27cf5 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1476,7 +1476,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 <http://www.gnu.org/licenses/>. - -# 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/ChangeLog b/gdb/gdbserver/ChangeLog index 0210536..71c7bcb 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2014-06-05 Joel Brobecker <brobecker@adacore.com> + + * development.sh: Delete. + * Makefile.in (config.status): Adjust dependency on development.sh. + * configure.ac: Adjust development.sh source call. + * configure: Regenerate. + 2014-06-02 Pedro Alves <palves@redhat.com> * ax.c (gdb_free_agent_expr): New function. 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. |