public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: enable -Werror by default for some arches
@ 2021-01-09  7:06 Mike Frysinger
  2021-01-09 11:32 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09  7:06 UTC (permalink / raw)
  To: gdb-patches

We've had this off for a long time because the sim code was way too
full of warnings for it to be feasible.  However, I've cleaned things
up significantly from when this was first merged, and we can start to
turn this around.

Change the macro to enable -Werror by default, and allow ports to opt
out.  New ports will get it automatically (and we can push back on
them if they try to turn it off).

Also turn it off for the few ports that still hit warnings for me.
All the rest will get the new default, and we'll wait for feedback
if/when new issues come up.
---
 sim/aarch64/configure    |  8 +++-----
 sim/arm/configure        |  8 +++-----
 sim/avr/configure        |  8 +++-----
 sim/bfin/configure       |  8 +++-----
 sim/common/acinclude.m4  | 11 ++++++-----
 sim/cr16/configure       |  5 -----
 sim/cr16/configure.ac    |  2 +-
 sim/cris/configure       |  5 -----
 sim/cris/configure.ac    |  2 +-
 sim/d10v/configure       |  5 -----
 sim/d10v/configure.ac    |  2 +-
 sim/ft32/configure       |  8 +++-----
 sim/igen/configure       |  8 +++-----
 sim/m32c/configure       |  5 -----
 sim/m32c/configure.ac    |  2 +-
 sim/m68hc11/configure    |  5 -----
 sim/m68hc11/configure.ac |  2 +-
 sim/mcore/configure      |  5 -----
 sim/mcore/configure.ac   |  2 +-
 sim/microblaze/configure |  8 +++-----
 sim/mips/configure       |  5 -----
 sim/mips/configure.ac    |  2 +-
 sim/mn10300/configure    |  5 -----
 sim/mn10300/configure.ac |  2 +-
 sim/moxie/configure      |  5 -----
 sim/moxie/configure.ac   |  2 +-
 sim/msp430/configure     |  8 +++-----
 sim/pru/configure        |  5 -----
 sim/pru/configure.ac     |  2 +-
 sim/sh/configure         |  5 -----
 sim/sh/configure.ac      |  2 +-
 sim/v850/configure       |  5 -----
 sim/v850/configure.ac    |  2 +-
 33 files changed, 42 insertions(+), 117 deletions(-)

diff --git a/sim/aarch64/configure b/sim/aarch64/configure
index a5ed5c95da92..6df9f8d7f3e3 100755
--- a/sim/aarch64/configure
+++ b/sim/aarch64/configure
@@ -13688,11 +13688,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/arm/configure b/sim/arm/configure
index 692cd9004d74..34002b2e0478 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/avr/configure b/sim/avr/configure
index 7cc3478c42de..5246f8efbfd9 100755
--- a/sim/avr/configure
+++ b/sim/avr/configure
@@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/bfin/configure b/sim/bfin/configure
index 0492d3893c1c..4131fb57e809 100755
--- a/sim/bfin/configure
+++ b/sim/bfin/configure
@@ -13743,11 +13743,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/common/acinclude.m4 b/sim/common/acinclude.m4
index 49d56b97f9bd..65afb429d6e8 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -737,6 +737,7 @@ AC_MSG_RESULT($sim_smp)
 
 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,
@@ -753,11 +754,11 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+m4_if(m4_default([$1], [yes]), [yes], [dnl
+  if test "${ERROR_ON_WARNING}" = yes ; then
+    WERROR_CFLAGS="-Werror"
+  fi
+])dnl
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/cr16/configure b/sim/cr16/configure
index ff93efd92db3..bfde3169e34b 100755
--- a/sim/cr16/configure
+++ b/sim/cr16/configure
@@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac
index 4f416b9247af..3155e4bd14fe 100644
--- a/sim/cr16/configure.ac
+++ b/sim/cr16/configure.ac
@@ -6,6 +6,6 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/cris/configure b/sim/cris/configure
index 96f545df4b0c..e75a8ced0cbd 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -13732,11 +13732,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 2ac3266577ae..12e0023e864e 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -10,7 +10,7 @@ AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
 SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 SIM_AC_OPTION_HARDWARE(yes,,rv cris cris_900000xx)
 
 # The default model shouldn't matter as long as there's a BFD.
diff --git a/sim/d10v/configure b/sim/d10v/configure
index 692cd9004d74..f0ce157bee77 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac
index 5dffa14bccc4..1551df5a4a6d 100644
--- a/sim/d10v/configure.ac
+++ b/sim/d10v/configure.ac
@@ -6,6 +6,6 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/ft32/configure b/sim/ft32/configure
index 94c3a43b3027..4defb86a7bb0 100755
--- a/sim/ft32/configure
+++ b/sim/ft32/configure
@@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/igen/configure b/sim/igen/configure
index 9ed39bfa128f..0239c5261632 100755
--- a/sim/igen/configure
+++ b/sim/igen/configure
@@ -4810,11 +4810,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/m32c/configure b/sim/m32c/configure
index 29df076e598b..18cd590a9138 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -13586,11 +13586,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/m32c/configure.ac b/sim/m32c/configure.ac
index 435741904ada..9477c23b7a1a 100644
--- a/sim/m32c/configure.ac
+++ b/sim/m32c/configure.ac
@@ -23,7 +23,7 @@ sinclude(../common/acinclude.m4)
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 AC_CHECK_HEADERS(sys/select.h termios.h sys/socket.h netinet/in.h netinet/tcp.h)
 
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index 2d8ff6b8e4b8..44a1daa1323c 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -13687,11 +13687,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac
index 34760decd865..800da69c8e40 100644
--- a/sim/m68hc11/configure.ac
+++ b/sim/m68hc11/configure.ac
@@ -7,7 +7,7 @@ SIM_AC_COMMON
 dnl Options available in this module
 SIM_AC_OPTION_ENDIAN(BIG)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 #
 # Add simulated hardware devices
diff --git a/sim/mcore/configure b/sim/mcore/configure
index 692cd9004d74..f0ce157bee77 100755
--- a/sim/mcore/configure
+++ b/sim/mcore/configure
@@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac
index 5dffa14bccc4..1551df5a4a6d 100644
--- a/sim/mcore/configure.ac
+++ b/sim/mcore/configure.ac
@@ -6,6 +6,6 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index 692cd9004d74..34002b2e0478 100755
--- a/sim/microblaze/configure
+++ b/sim/microblaze/configure
@@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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 b/sim/mips/configure
index 7180ced00e16..b226e38e28b8 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -13672,11 +13672,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 63670f269a0c..ad99e648e095 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -6,7 +6,7 @@ SIM_AC_COMMON
 
 dnl Options available in this module
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 SIM_AC_OPTION_RESERVED_BITS(1)
 
 # DEPRECATED
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index b8d356604bab..52d8a1261232 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -13693,11 +13693,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac
index 33ca50f055bd..d888d3c14921 100644
--- a/sim/mn10300/configure.ac
+++ b/sim/mn10300/configure.ac
@@ -6,7 +6,7 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 SIM_AC_OPTION_RESERVED_BITS
 SIM_AC_OPTION_BITSIZE(32,31)
 SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop)
diff --git a/sim/moxie/configure b/sim/moxie/configure
index 598d6547c6fc..7def66712470 100755
--- a/sim/moxie/configure
+++ b/sim/moxie/configure
@@ -13778,11 +13778,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac
index 3f2e55389e3a..a02e13a3dcb5 100644
--- a/sim/moxie/configure.ac
+++ b/sim/moxie/configure.ac
@@ -8,6 +8,6 @@ AC_CHECK_TOOL(DTC, dtc)
 
 SIM_AC_OPTION_ENDIAN(BIG)
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/msp430/configure b/sim/msp430/configure
index e6f51281d4e9..0e125ce1c9b4 100755
--- a/sim/msp430/configure
+++ b/sim/msp430/configure
@@ -13697,11 +13697,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
+  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/pru/configure b/sim/pru/configure
index 7cc3478c42de..b740f3568e29 100755
--- a/sim/pru/configure
+++ b/sim/pru/configure
@@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/pru/configure.ac b/sim/pru/configure.ac
index 92af45378edb..64dc298925f2 100644
--- a/sim/pru/configure.ac
+++ b/sim/pru/configure.ac
@@ -26,6 +26,6 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/sh/configure b/sim/sh/configure
index 692cd9004d74..f0ce157bee77 100755
--- a/sim/sh/configure
+++ b/sim/sh/configure
@@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac
index 5dffa14bccc4..1551df5a4a6d 100644
--- a/sim/sh/configure.ac
+++ b/sim/sh/configure.ac
@@ -6,6 +6,6 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN
 SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 
 SIM_AC_OUTPUT
diff --git a/sim/v850/configure b/sim/v850/configure
index 1067b56e0e8b..f59902c09c8f 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -13690,11 +13690,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
 fi
 
 WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-# NOTE: Disabled in the sim dir due to most sims generating warnings.
-#    WERROR_CFLAGS="-Werror"
-     true
-fi
 
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac
index 73f9e536b40e..31bca400dc23 100644
--- a/sim/v850/configure.ac
+++ b/sim/v850/configure.ac
@@ -6,7 +6,7 @@ SIM_AC_COMMON
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
-SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_WARNINGS(no)
 SIM_AC_OPTION_RESERVED_BITS
 SIM_AC_OPTION_BITSIZE(32,31)
 
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: enable -Werror by default for some arches
  2021-01-09  7:06 [PATCH] sim: enable -Werror by default for some arches Mike Frysinger
@ 2021-01-09 11:32 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-09 11:32 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 02:06:22 -0500]:

> We've had this off for a long time because the sim code was way too
> full of warnings for it to be feasible.  However, I've cleaned things
> up significantly from when this was first merged, and we can start to
> turn this around.
> 
> Change the macro to enable -Werror by default, and allow ports to opt
> out.  New ports will get it automatically (and we can push back on
> them if they try to turn it off).
> 
> Also turn it off for the few ports that still hit warnings for me.
> All the rest will get the new default, and we'll wait for feedback
> if/when new issues come up.

LGTM.  This will need a ChangeLog entry though :-/

Thanks,
Andrew


> ---
>  sim/aarch64/configure    |  8 +++-----
>  sim/arm/configure        |  8 +++-----
>  sim/avr/configure        |  8 +++-----
>  sim/bfin/configure       |  8 +++-----
>  sim/common/acinclude.m4  | 11 ++++++-----
>  sim/cr16/configure       |  5 -----
>  sim/cr16/configure.ac    |  2 +-
>  sim/cris/configure       |  5 -----
>  sim/cris/configure.ac    |  2 +-
>  sim/d10v/configure       |  5 -----
>  sim/d10v/configure.ac    |  2 +-
>  sim/ft32/configure       |  8 +++-----
>  sim/igen/configure       |  8 +++-----
>  sim/m32c/configure       |  5 -----
>  sim/m32c/configure.ac    |  2 +-
>  sim/m68hc11/configure    |  5 -----
>  sim/m68hc11/configure.ac |  2 +-
>  sim/mcore/configure      |  5 -----
>  sim/mcore/configure.ac   |  2 +-
>  sim/microblaze/configure |  8 +++-----
>  sim/mips/configure       |  5 -----
>  sim/mips/configure.ac    |  2 +-
>  sim/mn10300/configure    |  5 -----
>  sim/mn10300/configure.ac |  2 +-
>  sim/moxie/configure      |  5 -----
>  sim/moxie/configure.ac   |  2 +-
>  sim/msp430/configure     |  8 +++-----
>  sim/pru/configure        |  5 -----
>  sim/pru/configure.ac     |  2 +-
>  sim/sh/configure         |  5 -----
>  sim/sh/configure.ac      |  2 +-
>  sim/v850/configure       |  5 -----
>  sim/v850/configure.ac    |  2 +-
>  33 files changed, 42 insertions(+), 117 deletions(-)
> 
> diff --git a/sim/aarch64/configure b/sim/aarch64/configure
> index a5ed5c95da92..6df9f8d7f3e3 100755
> --- a/sim/aarch64/configure
> +++ b/sim/aarch64/configure
> @@ -13688,11 +13688,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/arm/configure b/sim/arm/configure
> index 692cd9004d74..34002b2e0478 100755
> --- a/sim/arm/configure
> +++ b/sim/arm/configure
> @@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/avr/configure b/sim/avr/configure
> index 7cc3478c42de..5246f8efbfd9 100755
> --- a/sim/avr/configure
> +++ b/sim/avr/configure
> @@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/bfin/configure b/sim/bfin/configure
> index 0492d3893c1c..4131fb57e809 100755
> --- a/sim/bfin/configure
> +++ b/sim/bfin/configure
> @@ -13743,11 +13743,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/common/acinclude.m4 b/sim/common/acinclude.m4
> index 49d56b97f9bd..65afb429d6e8 100644
> --- a/sim/common/acinclude.m4
> +++ b/sim/common/acinclude.m4
> @@ -737,6 +737,7 @@ AC_MSG_RESULT($sim_smp)
>  
>  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,
> @@ -753,11 +754,11 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +m4_if(m4_default([$1], [yes]), [yes], [dnl
> +  if test "${ERROR_ON_WARNING}" = yes ; then
> +    WERROR_CFLAGS="-Werror"
> +  fi
> +])dnl
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/cr16/configure b/sim/cr16/configure
> index ff93efd92db3..bfde3169e34b 100755
> --- a/sim/cr16/configure
> +++ b/sim/cr16/configure
> @@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac
> index 4f416b9247af..3155e4bd14fe 100644
> --- a/sim/cr16/configure.ac
> +++ b/sim/cr16/configure.ac
> @@ -6,6 +6,6 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/cris/configure b/sim/cris/configure
> index 96f545df4b0c..e75a8ced0cbd 100755
> --- a/sim/cris/configure
> +++ b/sim/cris/configure
> @@ -13732,11 +13732,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
> index 2ac3266577ae..12e0023e864e 100644
> --- a/sim/cris/configure.ac
> +++ b/sim/cris/configure.ac
> @@ -10,7 +10,7 @@ AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
>  SIM_AC_OPTION_SCACHE(16384)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  SIM_AC_OPTION_HARDWARE(yes,,rv cris cris_900000xx)
>  
>  # The default model shouldn't matter as long as there's a BFD.
> diff --git a/sim/d10v/configure b/sim/d10v/configure
> index 692cd9004d74..f0ce157bee77 100755
> --- a/sim/d10v/configure
> +++ b/sim/d10v/configure
> @@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac
> index 5dffa14bccc4..1551df5a4a6d 100644
> --- a/sim/d10v/configure.ac
> +++ b/sim/d10v/configure.ac
> @@ -6,6 +6,6 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN
>  SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/ft32/configure b/sim/ft32/configure
> index 94c3a43b3027..4defb86a7bb0 100755
> --- a/sim/ft32/configure
> +++ b/sim/ft32/configure
> @@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/igen/configure b/sim/igen/configure
> index 9ed39bfa128f..0239c5261632 100755
> --- a/sim/igen/configure
> +++ b/sim/igen/configure
> @@ -4810,11 +4810,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/m32c/configure b/sim/m32c/configure
> index 29df076e598b..18cd590a9138 100755
> --- a/sim/m32c/configure
> +++ b/sim/m32c/configure
> @@ -13586,11 +13586,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/m32c/configure.ac b/sim/m32c/configure.ac
> index 435741904ada..9477c23b7a1a 100644
> --- a/sim/m32c/configure.ac
> +++ b/sim/m32c/configure.ac
> @@ -23,7 +23,7 @@ sinclude(../common/acinclude.m4)
>  
>  SIM_AC_COMMON
>  
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  AC_CHECK_HEADERS(sys/select.h termios.h sys/socket.h netinet/in.h netinet/tcp.h)
>  
> diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
> index 2d8ff6b8e4b8..44a1daa1323c 100755
> --- a/sim/m68hc11/configure
> +++ b/sim/m68hc11/configure
> @@ -13687,11 +13687,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac
> index 34760decd865..800da69c8e40 100644
> --- a/sim/m68hc11/configure.ac
> +++ b/sim/m68hc11/configure.ac
> @@ -7,7 +7,7 @@ SIM_AC_COMMON
>  dnl Options available in this module
>  SIM_AC_OPTION_ENDIAN(BIG)
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  #
>  # Add simulated hardware devices
> diff --git a/sim/mcore/configure b/sim/mcore/configure
> index 692cd9004d74..f0ce157bee77 100755
> --- a/sim/mcore/configure
> +++ b/sim/mcore/configure
> @@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac
> index 5dffa14bccc4..1551df5a4a6d 100644
> --- a/sim/mcore/configure.ac
> +++ b/sim/mcore/configure.ac
> @@ -6,6 +6,6 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN
>  SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/microblaze/configure b/sim/microblaze/configure
> index 692cd9004d74..34002b2e0478 100755
> --- a/sim/microblaze/configure
> +++ b/sim/microblaze/configure
> @@ -13684,11 +13684,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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 b/sim/mips/configure
> index 7180ced00e16..b226e38e28b8 100755
> --- a/sim/mips/configure
> +++ b/sim/mips/configure
> @@ -13672,11 +13672,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
> index 63670f269a0c..ad99e648e095 100644
> --- a/sim/mips/configure.ac
> +++ b/sim/mips/configure.ac
> @@ -6,7 +6,7 @@ SIM_AC_COMMON
>  
>  dnl Options available in this module
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  SIM_AC_OPTION_RESERVED_BITS(1)
>  
>  # DEPRECATED
> diff --git a/sim/mn10300/configure b/sim/mn10300/configure
> index b8d356604bab..52d8a1261232 100755
> --- a/sim/mn10300/configure
> +++ b/sim/mn10300/configure
> @@ -13693,11 +13693,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac
> index 33ca50f055bd..d888d3c14921 100644
> --- a/sim/mn10300/configure.ac
> +++ b/sim/mn10300/configure.ac
> @@ -6,7 +6,7 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  SIM_AC_OPTION_RESERVED_BITS
>  SIM_AC_OPTION_BITSIZE(32,31)
>  SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop)
> diff --git a/sim/moxie/configure b/sim/moxie/configure
> index 598d6547c6fc..7def66712470 100755
> --- a/sim/moxie/configure
> +++ b/sim/moxie/configure
> @@ -13778,11 +13778,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac
> index 3f2e55389e3a..a02e13a3dcb5 100644
> --- a/sim/moxie/configure.ac
> +++ b/sim/moxie/configure.ac
> @@ -8,6 +8,6 @@ AC_CHECK_TOOL(DTC, dtc)
>  
>  SIM_AC_OPTION_ENDIAN(BIG)
>  SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/msp430/configure b/sim/msp430/configure
> index e6f51281d4e9..0e125ce1c9b4 100755
> --- a/sim/msp430/configure
> +++ b/sim/msp430/configure
> @@ -13697,11 +13697,9 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
> +  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/pru/configure b/sim/pru/configure
> index 7cc3478c42de..b740f3568e29 100755
> --- a/sim/pru/configure
> +++ b/sim/pru/configure
> @@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/pru/configure.ac b/sim/pru/configure.ac
> index 92af45378edb..64dc298925f2 100644
> --- a/sim/pru/configure.ac
> +++ b/sim/pru/configure.ac
> @@ -26,6 +26,6 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/sh/configure b/sim/sh/configure
> index 692cd9004d74..f0ce157bee77 100755
> --- a/sim/sh/configure
> +++ b/sim/sh/configure
> @@ -13684,11 +13684,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac
> index 5dffa14bccc4..1551df5a4a6d 100644
> --- a/sim/sh/configure.ac
> +++ b/sim/sh/configure.ac
> @@ -6,6 +6,6 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN
>  SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  
>  SIM_AC_OUTPUT
> diff --git a/sim/v850/configure b/sim/v850/configure
> index 1067b56e0e8b..f59902c09c8f 100755
> --- a/sim/v850/configure
> +++ b/sim/v850/configure
> @@ -13690,11 +13690,6 @@ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
>  fi
>  
>  WERROR_CFLAGS=""
> -if test "${ERROR_ON_WARNING}" = yes ; then
> -# NOTE: Disabled in the sim dir due to most sims generating warnings.
> -#    WERROR_CFLAGS="-Werror"
> -     true
> -fi
>  
>  build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
>  -Wpointer-sign \
> diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac
> index 73f9e536b40e..31bca400dc23 100644
> --- a/sim/v850/configure.ac
> +++ b/sim/v850/configure.ac
> @@ -6,7 +6,7 @@ SIM_AC_COMMON
>  
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
> -SIM_AC_OPTION_WARNINGS
> +SIM_AC_OPTION_WARNINGS(no)
>  SIM_AC_OPTION_RESERVED_BITS
>  SIM_AC_OPTION_BITSIZE(32,31)
>  
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-09 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09  7:06 [PATCH] sim: enable -Werror by default for some arches Mike Frysinger
2021-01-09 11:32 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).