aboutsummaryrefslogtreecommitdiff
path: root/sim/sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-18 02:14:52 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-18 10:15:15 -0400
commit982c3a65ca5dbea8d6de3afd934f0a06fef54383 (patch)
tree416ece9ed53e3350c23a09b381139bdc4cc9c6d7 /sim/sh
parent3f8414df7a533cccd39bf19c0e311975d9ededde (diff)
downloadfsf-binutils-gdb-982c3a65ca5dbea8d6de3afd934f0a06fef54383.zip
fsf-binutils-gdb-982c3a65ca5dbea8d6de3afd934f0a06fef54383.tar.gz
fsf-binutils-gdb-982c3a65ca5dbea8d6de3afd934f0a06fef54383.tar.bz2
sim: move -Werror disabling to Makefile
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.
Diffstat (limited to 'sim/sh')
-rw-r--r--sim/sh/ChangeLog6
-rw-r--r--sim/sh/Makefile.in3
-rwxr-xr-xsim/sh/configure7
-rw-r--r--sim/sh/configure.ac2
4 files changed, 13 insertions, 5 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 950fe1a..aeb2d0e 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SIM_WERROR_CFLAGS): New variable.
+ * configure.ac: Delete call to SIM_AC_OPTION_WARNINGS.
+ * configure: Regenerate.
+
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in
index 84d4172..e43fb5a 100644
--- a/sim/sh/Makefile.in
+++ b/sim/sh/Makefile.in
@@ -28,6 +28,9 @@ SIM_EXTRA_LIBS = -lm
SIM_EXTRA_CLEAN = sh-clean
SIM_EXTRA_DEPS = table.c code.c ppi.c
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
code.c: gencode
diff --git a/sim/sh/configure b/sim/sh/configure
index 661ad09..371c355 100755
--- a/sim/sh/configure
+++ b/sim/sh/configure
@@ -11149,12 +11149,14 @@ if test "${enable_werror+set}" = set; then :
fi
-# 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=""
+if test "${ERROR_ON_WARNING}" = yes ; then
+ WERROR_CFLAGS="-Werror"
+fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \
@@ -11236,7 +11238,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac
index 9bf4a40..08bf6ff 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