[PATCH/committed] sim: warnings: enable only for development builds
Checks
Commit Message
Reuse the bfd/development.sh script like most other project to
determine whether the current source tree is a dev build (e.g.
git) or a release build, and disable the warnings for releases.
---
sim/Makefile.am | 2 ++
sim/Makefile.in | 1 +
sim/configure | 8 +++++---
sim/configure.ac | 3 +++
sim/m4/sim_ac_option_warnings.m4 | 4 ++--
5 files changed, 13 insertions(+), 5 deletions(-)
@@ -45,6 +45,8 @@ MOSTLYCLEANFILES = core
## make sure all objects in subdirs get cleaned up.
MOSTLYCLEANFILES += $(SIM_ENABLED_ARCHES:%=%/*.o)
+CONFIG_STATUS_DEPENDENCIES = $(srcroot)/bfd/development.sh
+
AM_CFLAGS = \
$(WERROR_CFLAGS) \
$(WARN_CFLAGS) \
@@ -1798,6 +1798,7 @@ MOSTLYCLEANFILES = core $(SIM_ENABLED_ARCHES:%=%/*.o) \
$(am__append_57) $(am__append_61) $(am__append_75) \
$(am__append_80) $(am__append_88) $(am__append_103) \
$(am__append_107)
+CONFIG_STATUS_DEPENDENCIES = $(srcroot)/bfd/development.sh
AM_CFLAGS = \
$(WERROR_CFLAGS) \
$(WARN_CFLAGS) \
@@ -3009,6 +3009,8 @@ _ACEOF
ac_config_headers="$ac_config_headers config.h"
+. $srcdir/../bfd/development.sh
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -12288,7 +12290,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12291 "configure"
+#line 12293 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12394,7 +12396,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12397 "configure"
+#line 12399 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15811,7 +15813,7 @@ if test "${enable_werror+set}" = set; then :
fi
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
ERROR_ON_WARNING=yes
fi
@@ -14,6 +14,9 @@ AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address
AC_CONFIG_HEADERS([config.h])
+dnl Set the 'development' global before loading the SIM macros.
+. $srcdir/../bfd/development.sh
+
SIM_AC_TOOLCHAIN
SIM_AC_PLATFORM
@@ -25,8 +25,8 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
-dnl Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+dnl Enable -Werror by default when using gcc. Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
ERROR_ON_WARNING=yes
fi