summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd/warning.m4
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/bfd/warning.m4')
-rw-r--r--binutils-2.25/bfd/warning.m411
1 files changed, 7 insertions, 4 deletions
diff --git a/binutils-2.25/bfd/warning.m4 b/binutils-2.25/bfd/warning.m4
index 244dd448..de7e9e44 100644
--- a/binutils-2.25/bfd/warning.m4
+++ b/binutils-2.25/bfd/warning.m4
@@ -1,6 +1,6 @@
-dnl Common configure.in fragment
+dnl Common configure.ac fragment
dnl
-dnl Copyright 2012 Free Software Foundation
+dnl Copyright (C) 2012-2014 Free Software Foundation, Inc.
dnl
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -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