aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-14 23:45:42 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-14 23:47:01 -0400
commit79afa8caab2eef71b6463e04d2d2f2152106cd93 (patch)
tree5328daef71885aa66ecff2c62bb621c4fbdec227 /sim
parentaa077c0d188c724e9ab7506159ba46442a5c59dc (diff)
downloadfsf-binutils-gdb-79afa8caab2eef71b6463e04d2d2f2152106cd93.zip
fsf-binutils-gdb-79afa8caab2eef71b6463e04d2d2f2152106cd93.tar.gz
fsf-binutils-gdb-79afa8caab2eef71b6463e04d2d2f2152106cd93.tar.bz2
sim: mn10300: enable -Werror
Now that all warnings are fixed in this port, enable -Werror by default.
Diffstat (limited to 'sim')
-rw-r--r--sim/mn10300/ChangeLog5
-rwxr-xr-xsim/mn10300/configure213
-rw-r--r--sim/mn10300/configure.ac1
3 files changed, 113 insertions, 106 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index ff7d6c1..0083c1a 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,5 +1,10 @@
2021-06-14 Mike Frysinger <vapier@gentoo.org>
+ * configure.ac: Delete all to SIM_AC_OPTION_WARNINGS.
+ * configure: Regenerate.
+
+2021-06-14 Mike Frysinger <vapier@gentoo.org>
+
* mn10300.igen: Change abort to sim_engine_abort.
2021-06-12 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index c698a6d..0ff47dd 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -769,12 +769,12 @@ enable_libtool_lock
enable_maintainer_mode
enable_sim_inline
enable_sim_endian
-enable_werror
-enable_build_warnings
-enable_sim_build_warnings
enable_sim_reserved_bits
enable_sim_bitsize
enable_sim_hardware
+enable_werror
+enable_build_warnings
+enable_sim_build_warnings
'
ac_precious_vars='build_alias
host_alias
@@ -1415,17 +1415,17 @@ Optional Features:
Specify which functions should be inlined
--enable-sim-endian=endian
Specify target byte endian orientation
- --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
--enable-sim-bitsize=N Specify target bitsize (32 or 64)
--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]
@@ -11199,103 +11199,6 @@ fi
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 :
@@ -11473,6 +11376,106 @@ 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=""
+ 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/mn10300/configure.ac b/sim/mn10300/configure.ac
index b09159d..6754136 100644
--- a/sim/mn10300/configure.ac
+++ b/sim/mn10300/configure.ac
@@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN(LITTLE)
-SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_RESERVED_BITS
SIM_AC_OPTION_BITSIZE(32,31)
SIM_AC_OPTION_HARDWARE(mn103cpu mn103int mn103tim mn103ser mn103iop)