[PATCH 1.5/2] sim: move -Werror disabling to Makefile
Mike Frysinger
vapier@gentoo.org
Fri Jun 18 06:25:27 GMT 2021
For the ports that still don't build with -Werror, rather than disable
the flag at configure time, do it at make time. This will allow us to
unify these tests in the common sim configure script.
---
sim/aarch64/configure | 9 +-
sim/arm/configure | 9 +-
sim/avr/configure | 9 +-
sim/bfin/configure | 9 +-
sim/bpf/Makefile.in | 3 +
sim/bpf/configure | 78 ++++++------
sim/bpf/configure.ac | 1 -
sim/cr16/configure | 9 +-
sim/cris/Makefile.in | 3 +
sim/cris/configure | 212 ++++++++++++++++---------------
sim/cris/configure.ac | 1 -
sim/d10v/configure | 9 +-
sim/erc32/Makefile.in | 3 +
sim/erc32/configure | 196 ++++++++++++++--------------
sim/erc32/configure.ac | 1 -
sim/example-synacor/configure | 9 +-
sim/frv/Makefile.in | 3 +
sim/frv/configure | 118 ++++++++---------
sim/frv/configure.ac | 1 -
sim/ft32/configure | 9 +-
sim/h8300/configure | 9 +-
sim/iq2000/Makefile.in | 3 +
sim/iq2000/configure | 78 ++++++------
sim/iq2000/configure.ac | 1 -
sim/lm32/Makefile.in | 3 +
sim/lm32/configure | 206 +++++++++++++++---------------
sim/lm32/configure.ac | 1 -
sim/m32c/configure | 9 +-
sim/m32r/Makefile.in | 3 +
sim/m32r/configure | 206 +++++++++++++++---------------
sim/m32r/configure.ac | 1 -
sim/m4/sim_ac_option_warnings.m4 | 13 +-
sim/m68hc11/configure | 9 +-
sim/mcore/configure | 9 +-
sim/microblaze/configure | 9 +-
sim/mips/Makefile.in | 2 +
sim/mips/configure | 212 ++++++++++++++++---------------
sim/mips/configure.ac | 1 -
sim/mn10300/configure | 9 +-
sim/moxie/configure | 9 +-
sim/msp430/configure | 9 +-
sim/or1k/Makefile.in | 3 +
sim/or1k/configure | 78 ++++++------
sim/or1k/configure.ac | 1 -
sim/pru/configure | 9 +-
sim/riscv/configure | 9 +-
sim/rl78/configure | 9 +-
sim/rx/configure | 9 +-
sim/sh/Makefile.in | 3 +
sim/sh/configure | 7 +-
sim/sh/configure.ac | 2 -
sim/v850/configure | 9 +-
52 files changed, 823 insertions(+), 810 deletions(-)
diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac
index d2ec00c5a34c..a4138c097a89 100644
--- a/sim/bpf/configure.ac
+++ b/sim/bpf/configure.ac
@@ -7,7 +7,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_BITSIZE([64])
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL([bpf-def])
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 48c4bbeabac2..d94eabb683a9 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx)
# The default model shouldn't matter as long as there's a BFD.
diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac
index cf7ec5fdb803..3cb35d80f576 100644
--- a/sim/erc32/configure.ac
+++ b/sim/erc32/configure.ac
@@ -18,7 +18,6 @@ AC_INIT(Makefile.in)
AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
-SIM_AC_OPTION_WARNINGS(no)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index 39d8de4a5b8e..f652e269a3b8 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(fr500)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
#
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index 4afa1b3501d8..92c10d2eb183 100644
--- a/sim/iq2000/configure.ac
+++ b/sim/iq2000/configure.ac
@@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT
diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac
index 06c655696420..32bbd1b4ac1c 100644
--- a/sim/lm32/configure.ac
+++ b/sim/lm32/configure.ac
@@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(lm32)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OPTION_HARDWARE(lm32cpu lm32timer lm32uart)
diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac
index 9377081e938a..3146feee6408 100644
--- a/sim/m32r/configure.ac
+++ b/sim/m32r/configure.ac
@@ -6,7 +6,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(m32r/d)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
case "${target_alias}" in
diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index c831fa82596d..5a0fe304e9ce 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -15,7 +15,6 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl
dnl --enable-build-warnings is for developers of the simulator.
dnl it enables extra GCC specific warnings.
-dnl arg[1] Enable -Werror by default? ("yes" or "no")
AC_DEFUN([SIM_AC_OPTION_WARNINGS],
[
AC_ARG_ENABLE(werror,
@@ -26,17 +25,15 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
-# Enable -Werror by default when using gcc
+dnl Enable -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
+ ERROR_ON_WARNING=yes
fi
WERROR_CFLAGS=""
-m4_if(m4_default([$1], [yes]), [yes], [dnl
- if test "${ERROR_ON_WARNING}" = yes ; then
- WERROR_CFLAGS="-Werror"
- fi
-])dnl
+if test "${ERROR_ON_WARNING}" = yes ; then
+ WERROR_CFLAGS="-Werror"
+fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 03d8f5169e76..88f06ee13c91 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
dnl Options available in this module
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_RESERVED_BITS(1)
# DEPRECATED
diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac
index ed8538eb1089..576574c2ded2 100644
--- a/sim/or1k/configure.ac
+++ b/sim/or1k/configure.ac
@@ -7,7 +7,6 @@ SIM_AC_COMMON
SIM_AC_OPTION_BITSIZE([32], [31], [32])
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL([or1200])
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT
diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac
index 9bf4a4099ee5..08bf6ff8acbc 100644
--- a/sim/sh/configure.ac
+++ b/sim/sh/configure.ac
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
-SIM_AC_OPTION_WARNINGS(no)
-
SIM_AC_OUTPUT
--
2.31.1
More information about the Gdb-patches
mailing list