aboutsummaryrefslogtreecommitdiff
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
parent3f8414df7a533cccd39bf19c0e311975d9ededde (diff)
downloadgdb-982c3a65ca5dbea8d6de3afd934f0a06fef54383.zip
gdb-982c3a65ca5dbea8d6de3afd934f0a06fef54383.tar.gz
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.
-rw-r--r--sim/ChangeLog4
-rw-r--r--sim/aarch64/ChangeLog4
-rwxr-xr-xsim/aarch64/configure9
-rw-r--r--sim/arm/ChangeLog4
-rwxr-xr-xsim/arm/configure9
-rw-r--r--sim/avr/ChangeLog4
-rwxr-xr-xsim/avr/configure9
-rw-r--r--sim/bfin/ChangeLog4
-rwxr-xr-xsim/bfin/configure9
-rw-r--r--sim/bpf/ChangeLog6
-rw-r--r--sim/bpf/Makefile.in3
-rwxr-xr-xsim/bpf/configure78
-rw-r--r--sim/bpf/configure.ac1
-rw-r--r--sim/cr16/ChangeLog4
-rwxr-xr-xsim/cr16/configure9
-rw-r--r--sim/cris/ChangeLog6
-rw-r--r--sim/cris/Makefile.in3
-rwxr-xr-xsim/cris/configure212
-rw-r--r--sim/cris/configure.ac1
-rw-r--r--sim/d10v/ChangeLog4
-rwxr-xr-xsim/d10v/configure9
-rw-r--r--sim/erc32/ChangeLog6
-rw-r--r--sim/erc32/Makefile.in3
-rwxr-xr-xsim/erc32/configure196
-rw-r--r--sim/erc32/configure.ac1
-rw-r--r--sim/example-synacor/ChangeLog4
-rwxr-xr-xsim/example-synacor/configure9
-rw-r--r--sim/frv/ChangeLog6
-rw-r--r--sim/frv/Makefile.in3
-rwxr-xr-xsim/frv/configure118
-rw-r--r--sim/frv/configure.ac1
-rw-r--r--sim/ft32/ChangeLog4
-rwxr-xr-xsim/ft32/configure9
-rw-r--r--sim/h8300/ChangeLog4
-rwxr-xr-xsim/h8300/configure9
-rw-r--r--sim/iq2000/ChangeLog6
-rw-r--r--sim/iq2000/Makefile.in3
-rwxr-xr-xsim/iq2000/configure78
-rw-r--r--sim/iq2000/configure.ac1
-rw-r--r--sim/lm32/ChangeLog6
-rw-r--r--sim/lm32/Makefile.in3
-rwxr-xr-xsim/lm32/configure206
-rw-r--r--sim/lm32/configure.ac1
-rw-r--r--sim/m32c/ChangeLog4
-rwxr-xr-xsim/m32c/configure9
-rw-r--r--sim/m32r/ChangeLog6
-rw-r--r--sim/m32r/Makefile.in3
-rwxr-xr-xsim/m32r/configure206
-rw-r--r--sim/m32r/configure.ac1
-rw-r--r--sim/m4/sim_ac_option_warnings.m413
-rw-r--r--sim/m68hc11/ChangeLog4
-rwxr-xr-xsim/m68hc11/configure9
-rw-r--r--sim/mcore/ChangeLog4
-rwxr-xr-xsim/mcore/configure9
-rw-r--r--sim/microblaze/ChangeLog4
-rwxr-xr-xsim/microblaze/configure9
-rw-r--r--sim/mips/ChangeLog6
-rw-r--r--sim/mips/Makefile.in2
-rwxr-xr-xsim/mips/configure212
-rw-r--r--sim/mips/configure.ac1
-rw-r--r--sim/mn10300/ChangeLog4
-rwxr-xr-xsim/mn10300/configure9
-rw-r--r--sim/moxie/ChangeLog4
-rwxr-xr-xsim/moxie/configure9
-rw-r--r--sim/msp430/ChangeLog4
-rwxr-xr-xsim/msp430/configure9
-rw-r--r--sim/or1k/ChangeLog6
-rw-r--r--sim/or1k/Makefile.in3
-rwxr-xr-xsim/or1k/configure78
-rw-r--r--sim/or1k/configure.ac1
-rw-r--r--sim/pru/ChangeLog4
-rwxr-xr-xsim/pru/configure9
-rw-r--r--sim/riscv/ChangeLog4
-rwxr-xr-xsim/riscv/configure9
-rw-r--r--sim/rl78/ChangeLog4
-rwxr-xr-xsim/rl78/configure9
-rw-r--r--sim/rx/ChangeLog4
-rwxr-xr-xsim/rx/configure9
-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
-rw-r--r--sim/v850/ChangeLog4
-rwxr-xr-xsim/v850/configure9
84 files changed, 971 insertions, 810 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 65d0f11..70c02b8 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * m4/sim_ac_option_warnings.m4: Delete 1st arg to macro.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* configure.ac: Output arch-subdir.mk.
* Makefile.in, configure: Regenerate.
* arch-subdir.mk.in: New file.
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index f5d1990..97bea6d 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* cpustate.c: Include sim-signal.h.
* memory.c, simulator.c: Likewise.
diff --git a/sim/aarch64/configure b/sim/aarch64/configure
index 2c8a6e0..371c355 100755
--- a/sim/aarch64/configure
+++ b/sim/aarch64/configure
@@ -11149,15 +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
+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/ChangeLog b/sim/arm/ChangeLog
index 8bb9bff..866d168 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
diff --git a/sim/arm/configure b/sim/arm/configure
index 2c8a6e0..371c355 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -11149,15 +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
+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/ChangeLog b/sim/avr/ChangeLog
index 6fa075c..0d94305 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/avr/configure b/sim/avr/configure
index 2c8a6e0..371c355 100755
--- a/sim/avr/configure
+++ b/sim/avr/configure
@@ -11149,15 +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
+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/ChangeLog b/sim/bfin/ChangeLog
index 1e83b2b..9507033 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* dv-bfin_cec.c: Include sim-signal.h.
* sim-main.h: Delete sim-signal.h include.
diff --git a/sim/bfin/configure b/sim/bfin/configure
index d4aa3a2..1344e1e 100755
--- a/sim/bfin/configure
+++ b/sim/bfin/configure
@@ -11579,15 +11579,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
+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/bpf/ChangeLog b/sim/bpf/ChangeLog
index fd12bbf..08d5af8 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* bpf.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in
index c19d13c..d165feb 100644
--- a/sim/bpf/Makefile.in
+++ b/sim/bpf/Makefile.in
@@ -41,6 +41,9 @@ SIM_EXTRA_DEPS = \
SIM_EXTRA_CLEAN = bpf-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
# cgen support, enable with --enable-cgen-maint
diff --git a/sim/bpf/configure b/sim/bpf/configure
index a0ed8ab..15f8b7c 100755
--- a/sim/bpf/configure
+++ b/sim/bpf/configure
@@ -772,10 +772,10 @@ enable_sim_inline
enable_sim_bitsize
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@@ -1420,12 +1420,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@@ -11246,6 +11246,40 @@ fi
+cgen_maint=no
+cgen=guile
+cgendir='$(srcdir)/../../cgen'
+# Check whether --enable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then :
+ enableval=$enable_cgen_maint; case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # Argument is a directory where cgen can be found. In some
+ # future world cgen could be installable, but right now this
+ # is not the case. Instead we assume the directory is a path
+ # to the cgen source tree.
+ cgen_maint=yes
+ if test -r ${enableval}/iformat.scm; then
+ # This looks like a cgen source tree.
+ cgendir=${enableval}
+ else
+ as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
+ fi
+ ;;
+esac
+fi
+if test x${cgen_maint} != xno ; then
+ CGEN_MAINT=''
+else
+ CGEN_MAINT='#'
+fi
+
+
+
+
+
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@@ -11256,12 +11290,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 \
@@ -11343,40 +11379,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then :
- enableval=$enable_cgen_maint; case "${enableval}" in
- yes) cgen_maint=yes ;;
- no) cgen_maint=no ;;
- *)
- # Argument is a directory where cgen can be found. In some
- # future world cgen could be installable, but right now this
- # is not the case. Instead we assume the directory is a path
- # to the cgen source tree.
- cgen_maint=yes
- if test -r ${enableval}/iformat.scm; then
- # This looks like a cgen source tree.
- cgendir=${enableval}
- else
- as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
- fi
- ;;
-esac
-fi
-if test x${cgen_maint} != xno ; then
- CGEN_MAINT=''
-else
- CGEN_MAINT='#'
-fi
-
-
-
-
-
-
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac
index d2ec00c..a4138c0 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/cr16/ChangeLog b/sim/cr16/ChangeLog
index b79d031..a05768c 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
* simops.c: Likewise.
diff --git a/sim/cr16/configure b/sim/cr16/configure
index 2c8a6e0..371c355 100755
--- a/sim/cr16/configure
+++ b/sim/cr16/configure
@@ -11149,15 +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
+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/cris/ChangeLog b/sim/cris/ChangeLog
index a69349a..34a6264 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 4d0cdd2..0b4b8f5 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -39,6 +39,9 @@ SIM_EXTRA_DEPS = \
SIM_EXTRA_CLEAN = cris-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = cris
diff --git a/sim/cris/configure b/sim/cris/configure
index cd6fe78..7d82dbd 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -770,12 +770,12 @@ enable_libtool_lock
enable_maintainer_mode
enable_sim_inline
enable_sim_scache
-enable_werror
-enable_build_warnings
-enable_sim_build_warnings
enable_sim_hardware
enable_sim_default_model
enable_cgen_maint
+enable_werror
+enable_build_warnings
+enable_sim_build_warnings
'
ac_precious_vars='build_alias
host_alias
@@ -1416,16 +1416,16 @@ Optional Features:
Specify which functions should be inlined
--enable-sim-scache=size
Specify simulator execution cache size
- --enable-werror treat compile warnings as errors
- --enable-build-warnings enable build-time compiler warnings if gcc is used
- --enable-sim-build-warnings
- enable SIM specific build-time compiler warnings if
- gcc is used
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
--enable-sim-default-model=model
Specify default model to simulate
--enable-cgen-maint=DIR build cgen generated files
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings if gcc is used
+ --enable-sim-build-warnings
+ enable SIM specific build-time compiler warnings if
+ gcc is used
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11169,103 +11169,6 @@ fi
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
- esac
-fi
-
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
- *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
- enableval=$enable_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
- enableval=$enable_sim_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) # Check that GCC accepts it
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $w"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$saved_CFLAGS"
- esac
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
-
-
hardware="cfi core pal glue rv cris cris_900000xx"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
@@ -11415,6 +11318,105 @@ fi
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+ esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ 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 \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+ enableval=$enable_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+ enableval=$enable_sim_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror $w"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 48c4bbe..d94eabb 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/d10v/ChangeLog b/sim/d10v/ChangeLog
index 429b4d0..7157567 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
* simops.c: Likewise.
diff --git a/sim/d10v/configure b/sim/d10v/configure
index 2c8a6e0..371c355 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -11149,15 +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
+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/erc32/ChangeLog b/sim/erc32/ChangeLog
index 24d1aac..94a0cb9 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/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: Regenerate.
diff --git a/sim/erc32/Makefile.in b/sim/erc32/Makefile.in
index 5c29b0a..278b479 100644
--- a/sim/erc32/Makefile.in
+++ b/sim/erc32/Makefile.in
@@ -36,6 +36,9 @@ SIM_EXTRA_CLEAN = clean-sis
# behaviour of UART interrupt routines ...
SIM_EXTRA_CFLAGS += -DFAST_UART -I$(srcroot)
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
# `sis' doesn't need interf.o.
diff --git a/sim/erc32/configure b/sim/erc32/configure
index 2b10dc4..04122f7 100755
--- a/sim/erc32/configure
+++ b/sim/erc32/configure
@@ -11141,103 +11141,6 @@ fi
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
- esac
-fi
-
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
- *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
- enableval=$enable_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
- enableval=$enable_sim_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) # Check that GCC accepts it
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $w"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$saved_CFLAGS"
- esac
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
-
-
# In the Cygwin environment, we need some additional flags.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
$as_echo_n "checking for cygwin... " >&6; }
@@ -11380,6 +11283,105 @@ fi
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+ esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ 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 \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+ enableval=$enable_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+ enableval=$enable_sim_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror $w"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$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/erc32/configure.ac b/sim/erc32/configure.ac
index cf7ec5f..3cb35d8 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/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog
index a55ed0f..bee0c95 100644
--- a/sim/example-synacor/ChangeLog
+++ b/sim/example-synacor/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/example-synacor/configure b/sim/example-synacor/configure
index 2c8a6e0..371c355 100755
--- a/sim/example-synacor/configure
+++ b/sim/example-synacor/configure
@@ -11149,15 +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
+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/frv/ChangeLog b/sim/frv/ChangeLog
index 16bbf48..c984f11 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* interrupts.c: Include sim-signal.h.
* traps.c: Likewise.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 7d1eaf51..5356add 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -40,6 +40,9 @@ SIM_EXTRA_CFLAGS = @sim_trapdump@
SIM_EXTRA_CLEAN = frv-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = frv
diff --git a/sim/frv/configure b/sim/frv/configure
index a578200..685a3d1 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -772,11 +772,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
+enable_sim_trapdump
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
-enable_sim_trapdump
enable_sim_hardware
'
ac_precious_vars='build_alias
@@ -1420,13 +1420,13 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
+ --enable-sim-trapdump Make unknown traps dump the registers
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
- --enable-sim-trapdump Make unknown traps dump the registers
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@@ -11188,6 +11188,58 @@ fi
+cgen_maint=no
+cgen=guile
+cgendir='$(srcdir)/../../cgen'
+# Check whether --enable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then :
+ enableval=$enable_cgen_maint; case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # Argument is a directory where cgen can be found. In some
+ # future world cgen could be installable, but right now this
+ # is not the case. Instead we assume the directory is a path
+ # to the cgen source tree.
+ cgen_maint=yes
+ if test -r ${enableval}/iformat.scm; then
+ # This looks like a cgen source tree.
+ cgendir=${enableval}
+ else
+ as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
+ fi
+ ;;
+esac
+fi
+if test x${cgen_maint} != xno ; then
+ CGEN_MAINT=''
+else
+ CGEN_MAINT='#'
+fi
+
+
+
+
+
+#
+# Enable making unknown traps dump out registers
+#
+# Check whether --enable-sim-trapdump was given.
+if test "${enable_sim_trapdump+set}" = set; then :
+ enableval=$enable_sim_trapdump; case "${enableval}" in
+ yes) sim_trapdump="-DTRAPDUMP=1";;
+ no) sim_trapdump="-DTRAPDUMP=0";;
+ *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5; sim_trapdump="";;
+esac
+if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
+ echo "Setting sim_trapdump = $sim_trapdump" 6>&1
+fi
+else
+ sim_trapdump=""
+fi
+
+
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@@ -11198,12 +11250,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 \
@@ -11285,58 +11339,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then :
- enableval=$enable_cgen_maint; case "${enableval}" in
- yes) cgen_maint=yes ;;
- no) cgen_maint=no ;;
- *)
- # Argument is a directory where cgen can be found. In some
- # future world cgen could be installable, but right now this
- # is not the case. Instead we assume the directory is a path
- # to the cgen source tree.
- cgen_maint=yes
- if test -r ${enableval}/iformat.scm; then
- # This looks like a cgen source tree.
- cgendir=${enableval}
- else
- as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
- fi
- ;;
-esac
-fi
-if test x${cgen_maint} != xno ; then
- CGEN_MAINT=''
-else
- CGEN_MAINT='#'
-fi
-
-
-
-
-
-#
-# Enable making unknown traps dump out registers
-#
-# Check whether --enable-sim-trapdump was given.
-if test "${enable_sim_trapdump+set}" = set; then :
- enableval=$enable_sim_trapdump; case "${enableval}" in
- yes) sim_trapdump="-DTRAPDUMP=1";;
- no) sim_trapdump="-DTRAPDUMP=0";;
- *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5; sim_trapdump="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
- echo "Setting sim_trapdump = $sim_trapdump" 6>&1
-fi
-else
- sim_trapdump=""
-fi
-
-
-
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index 39d8de4..f652e26 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/ft32/ChangeLog b/sim/ft32/ChangeLog
index 19ffbad..e57f29f 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/ft32/configure b/sim/ft32/configure
index 2c8a6e0..371c355 100755
--- a/sim/ft32/configure
+++ b/sim/ft32/configure
@@ -11149,15 +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
+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/h8300/ChangeLog b/sim/h8300/ChangeLog
index 72e2926..bd506aa 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* compile.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/h8300/configure b/sim/h8300/configure
index 2c8a6e0..371c355 100755
--- a/sim/h8300/configure
+++ b/sim/h8300/configure
@@ -11149,15 +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
+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/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 5318570..737fad3 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* iq2000.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in
index dfa0e67..f7a77c2 100644
--- a/sim/iq2000/Makefile.in
+++ b/sim/iq2000/Makefile.in
@@ -37,6 +37,9 @@ ALL_CPU_CFLAGS = -DHAVE_CPU_IQ2000BF -DHAVE_CPU_IQ10BF
SIM_EXTRA_CLEAN = iq2000-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = iq2000
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index a646739..b83dfb6 100755
--- a/sim/iq2000/configure
+++ b/sim/iq2000/configure
@@ -771,10 +771,10 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@@ -1418,12 +1418,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@@ -11185,6 +11185,40 @@ fi
+cgen_maint=no
+cgen=guile
+cgendir='$(srcdir)/../../cgen'
+# Check whether --enable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then :
+ enableval=$enable_cgen_maint; case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # Argument is a directory where cgen can be found. In some
+ # future world cgen could be installable, but right now this
+ # is not the case. Instead we assume the directory is a path
+ # to the cgen source tree.
+ cgen_maint=yes
+ if test -r ${enableval}/iformat.scm; then
+ # This looks like a cgen source tree.
+ cgendir=${enableval}
+ else
+ as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
+ fi
+ ;;
+esac
+fi
+if test x${cgen_maint} != xno ; then
+ CGEN_MAINT=''
+else
+ CGEN_MAINT='#'
+fi
+
+
+
+
+
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@@ -11195,12 +11229,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 \
@@ -11282,40 +11318,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then :
- enableval=$enable_cgen_maint; case "${enableval}" in
- yes) cgen_maint=yes ;;
- no) cgen_maint=no ;;
- *)
- # Argument is a directory where cgen can be found. In some
- # future world cgen could be installable, but right now this
- # is not the case. Instead we assume the directory is a path
- # to the cgen source tree.
- cgen_maint=yes
- if test -r ${enableval}/iformat.scm; then
- # This looks like a cgen source tree.
- cgendir=${enableval}
- else
- as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
- fi
- ;;
-esac
-fi
-if test x${cgen_maint} != xno ; then
- CGEN_MAINT=''
-else
- CGEN_MAINT='#'
-fi
-
-
-
-
-
-
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index 4afa1b3..92c10d2 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/ChangeLog b/sim/lm32/ChangeLog
index 7aee807..c82947a 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index 31c3940..29489bc 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -22,6 +22,9 @@ SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
SIM_EXTRA_CLEAN = lm32-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = lm32
diff --git a/sim/lm32/configure b/sim/lm32/configure
index 6c1d03d..6fb3d97 100755
--- a/sim/lm32/configure
+++ b/sim/lm32/configure
@@ -771,11 +771,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
+enable_sim_hardware
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
-enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1418,14 +1418,14 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
- --enable-sim-hardware=LIST
- Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11185,103 +11185,6 @@ fi
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
- esac
-fi
-
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
- *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
- enableval=$enable_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
- enableval=$enable_sim_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) # Check that GCC accepts it
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $w"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$saved_CFLAGS"
- esac
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
-
-
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
@@ -11413,6 +11316,105 @@ fi
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+ esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ 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 \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+ enableval=$enable_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+ enableval=$enable_sim_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror $w"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac
index 06c6556..32bbd1b 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/m32c/ChangeLog b/sim/m32c/ChangeLog
index 18a2882..8c3703a 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/m32c/configure b/sim/m32c/configure
index 2c8a6e0..371c355 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -11149,15 +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
+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/m32r/ChangeLog b/sim/m32r/ChangeLog
index f660050..bdf8490 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* traps-linux.c: Include sim-signal.h.
* traps.c:
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index 2bb246d..2729745 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -44,6 +44,9 @@ SIM_EXTRA_CFLAGS = @sim_extra_cflags@
SIM_EXTRA_CLEAN = m32r-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = m32r
diff --git a/sim/m32r/configure b/sim/m32r/configure
index 1f12c92..b144a15 100755
--- a/sim/m32r/configure
+++ b/sim/m32r/configure
@@ -773,11 +773,11 @@ enable_maintainer_mode
enable_sim_inline
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
+enable_sim_hardware
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
-enable_sim_hardware
'
ac_precious_vars='build_alias
host_alias
@@ -1420,14 +1420,14 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
- --enable-sim-hardware=LIST
- Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11187,103 +11187,6 @@ fi
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
- esac
-fi
-
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
- *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
- enableval=$enable_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
- enableval=$enable_sim_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) # Check that GCC accepts it
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $w"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$saved_CFLAGS"
- esac
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
-
-
cgen_maint=no
cgen=guile
cgendir='$(srcdir)/../../cgen'
@@ -11429,6 +11332,105 @@ fi
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+ esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ 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 \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+ enableval=$enable_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+ enableval=$enable_sim_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror $w"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac
index 9377081..3146fee 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 c831fa8..5a0fe30 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/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index dd9ccce..fffa98c 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* dv-m68hc11eepr.c: Include sim-signal.h.
* interrupts.c, m68hc11_sim.c: Likewise.
* sim-main.h: Delete sim-signal.h include.
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index 1ed8c04..e24c650 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -11248,15 +11248,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
+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/mcore/ChangeLog b/sim/mcore/ChangeLog
index 3757d29..1a6cdbc 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mcore/configure b/sim/mcore/configure
index 2c8a6e0..371c355 100755
--- a/sim/mcore/configure
+++ b/sim/mcore/configure
@@ -11149,15 +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
+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/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index abeac71..10e4fff 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index 2c8a6e0..371c355 100755
--- a/sim/microblaze/configure
+++ b/sim/microblaze/configure
@@ -11149,15 +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
+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/ChangeLog b/sim/mips/ChangeLog
index 2ad72ef..3308173 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 7e1356c..2f79c56 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -81,6 +81,8 @@ all: $(SIM_@sim_gen@_ALL)
SIM_EXTRA_DEPS = itable.h
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
## COMMON_POST_CONFIG_FRAG
diff --git a/sim/mips/configure b/sim/mips/configure
index 55041fd..db16388 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -777,14 +777,14 @@ with_gnu_ld
enable_libtool_lock
enable_maintainer_mode
enable_sim_inline
-enable_werror
-enable_build_warnings
-enable_sim_build_warnings
enable_sim_reserved_bits
enable_sim_bitsize
enable_sim_float
enable_sim_hardware
with_x
+enable_werror
+enable_build_warnings
+enable_sim_build_warnings
'
ac_precious_vars='build_alias
host_alias
@@ -1428,11 +1428,6 @@ Optional Features:
sometimes confusing) to the casual installer
--enable-sim-inline=inlines
Specify which functions should be inlined
- --enable-werror treat compile warnings as errors
- --enable-build-warnings enable build-time compiler warnings if gcc is used
- --enable-sim-build-warnings
- enable SIM specific build-time compiler warnings if
- gcc is used
--enable-sim-reserved-bits
Specify whether to check reserved bits in
instruction
@@ -1441,6 +1436,11 @@ Optional Features:
hardware
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings if gcc is used
+ --enable-sim-build-warnings
+ enable SIM specific build-time compiler warnings if
+ gcc is used
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -11167,103 +11167,6 @@ fi
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
- esac
-fi
-
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-WERROR_CFLAGS=""
-
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
- *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
-esac
-
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
- enableval=$enable_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
- enableval=$enable_sim_build_warnings; case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) # Check that GCC accepts it
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $w"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$saved_CFLAGS"
- esac
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
-
-
default_sim_reserved_bits="1"
# Check whether --enable-sim-reserved-bits was given.
if test "${enable_sim_reserved_bits+set}" = set; then :
@@ -12102,6 +12005,105 @@ fi
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+ esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ 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 \
+-Wno-unused -Wunused-value -Wunused-function \
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
+
+# Enable -Wno-format by default when using gcc on mingw since many
+# GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+ enableval=$enable_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+ enableval=$enable_sim_build_warnings; case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror $w"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
+fi
+
+
cgen_breaks=""
if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
cgen_breaks="break cgen_rtx_error";
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 03d8f51..88f06ee 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/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 6bdb23e..c885362 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
* op_utils.c, sim-main.h: Likewise.
* mn10300_sim.h: Delete sim-signal.h include.
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index d24ac1d..43005f7 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -11328,15 +11328,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
+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/moxie/ChangeLog b/sim/moxie/ChangeLog
index 66f7b61..71a84c7 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/moxie/configure b/sim/moxie/configure
index 26ccbb3..de69f08 100755
--- a/sim/moxie/configure
+++ b/sim/moxie/configure
@@ -11243,15 +11243,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
+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/msp430/ChangeLog b/sim/msp430/ChangeLog
index 0874398..04aa101 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* msp430-sim.c: Include sim-signal.h.
* sim-main.h: Delete sim-signal.h include.
diff --git a/sim/msp430/configure b/sim/msp430/configure
index 2c8a6e0..371c355 100755
--- a/sim/msp430/configure
+++ b/sim/msp430/configure
@@ -11149,15 +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
+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/or1k/ChangeLog b/sim/or1k/ChangeLog
index 33799ac..a5a1960 100644
--- a/sim/or1k/ChangeLog
+++ b/sim/or1k/ChangeLog
@@ -1,5 +1,11 @@
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-18 Mike Frysinger <vapier@gentoo.org>
+
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/or1k/Makefile.in b/sim/or1k/Makefile.in
index 649486f..c6083b0 100644
--- a/sim/or1k/Makefile.in
+++ b/sim/or1k/Makefile.in
@@ -55,6 +55,9 @@ SIM_EXTRA_LIBS = -lm
SIM_EXTRA_CLEAN = or1k-clean
+# Code doesn't build cleanly yet.
+SIM_WERROR_CFLAGS =
+
## COMMON_POST_CONFIG_FRAG
arch = or1k
diff --git a/sim/or1k/configure b/sim/or1k/configure
index d736624..fa8853c 100755
--- a/sim/or1k/configure
+++ b/sim/or1k/configure
@@ -772,10 +772,10 @@ enable_sim_inline
enable_sim_bitsize
enable_sim_scache
enable_sim_default_model
+enable_cgen_maint
enable_werror
enable_build_warnings
enable_sim_build_warnings
-enable_cgen_maint
enable_sim_hardware
'
ac_precious_vars='build_alias
@@ -1420,12 +1420,12 @@ Optional Features:
Specify simulator execution cache size
--enable-sim-default-model=model
Specify default model to simulate
+ --enable-cgen-maint=DIR build cgen generated files
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-cgen-maint=DIR build cgen generated files
--enable-sim-hardware=LIST
Specify the hardware to be included in the build.
@@ -11246,6 +11246,40 @@ fi
+cgen_maint=no
+cgen=guile
+cgendir='$(srcdir)/../../cgen'
+# Check whether --enable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then :
+ enableval=$enable_cgen_maint; case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # Argument is a directory where cgen can be found. In some
+ # future world cgen could be installable, but right now this
+ # is not the case. Instead we assume the directory is a path
+ # to the cgen source tree.
+ cgen_maint=yes
+ if test -r ${enableval}/iformat.scm; then
+ # This looks like a cgen source tree.
+ cgendir=${enableval}
+ else
+ as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
+ fi
+ ;;
+esac
+fi
+if test x${cgen_maint} != xno ; then
+ CGEN_MAINT=''
+else
+ CGEN_MAINT='#'
+fi
+
+
+
+
+
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in
@@ -11256,12 +11290,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 \
@@ -11343,40 +11379,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then :
- enableval=$enable_cgen_maint; case "${enableval}" in
- yes) cgen_maint=yes ;;
- no) cgen_maint=no ;;
- *)
- # Argument is a directory where cgen can be found. In some
- # future world cgen could be installable, but right now this
- # is not the case. Instead we assume the directory is a path
- # to the cgen source tree.
- cgen_maint=yes
- if test -r ${enableval}/iformat.scm; then
- # This looks like a cgen source tree.
- cgendir=${enableval}
- else
- as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
- fi
- ;;
-esac
-fi
-if test x${cgen_maint} != xno ; then
- CGEN_MAINT=''
-else
- CGEN_MAINT='#'
-fi
-
-
-
-
-
-
hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac
index ed8538e..576574c 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/pru/ChangeLog b/sim/pru/ChangeLog
index 6e06c73..68e2941 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/pru/configure b/sim/pru/configure
index 2c8a6e0..371c355 100755
--- a/sim/pru/configure
+++ b/sim/pru/configure
@@ -11149,15 +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
+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/riscv/ChangeLog b/sim/riscv/ChangeLog
index 925fa0c..ba8734c 100644
--- a/sim/riscv/ChangeLog
+++ b/sim/riscv/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* sim-main.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/riscv/configure b/sim/riscv/configure
index cdbedcc..94bf447 100755
--- a/sim/riscv/configure
+++ b/sim/riscv/configure
@@ -11243,15 +11243,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
+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/rl78/ChangeLog b/sim/rl78/ChangeLog
index a2e2cfb..123392d 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/rl78/configure b/sim/rl78/configure
index 2c8a6e0..371c355 100755
--- a/sim/rl78/configure
+++ b/sim/rl78/configure
@@ -11149,15 +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
+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/rx/ChangeLog b/sim/rx/ChangeLog
index 0b3cbc6..8ed41af 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
+ * configure: Regenerate.
+
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/rx/configure b/sim/rx/configure
index 7200bcb..837b7ef 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -11169,15 +11169,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
+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/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
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 23f432c..b3fc86f 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,5 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
+ * configure: Regenerate.
+
+2021-06-18 Mike Frysinger <vapier@gentoo.org>
+
* simops.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/v850/configure b/sim/v850/configure
index 9f83ff1..8666204 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -11231,15 +11231,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
+if test "${ERROR_ON_WARNING}" = yes ; then
+ WERROR_CFLAGS="-Werror"
+fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wpointer-sign \