aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/Makefile.am3
-rw-r--r--bfd/Makefile.in3
-rwxr-xr-xbfd/configure7
-rw-r--r--bfd/development.sh19
-rw-r--r--bfd/warning.m47
6 files changed, 42 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e6b88e3..1ff9fca 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-05 Joel Brobecker <brobecker@adacore.com>
+
+ * 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.
+
2014-06-04 Will Newton <will.newton@linaro.org>
* elfnn-aarch64.c (tpoff_base): Make test of tls_sec
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 <http://www.gnu.org/licenses/>.
+
+# 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 <http://www.gnu.org/licenses/>.
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