aboutsummaryrefslogtreecommitdiff
path: root/sim/frv
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-18 02:14:52 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-18 10:15:15 -0400
commit982c3a65ca5dbea8d6de3afd934f0a06fef54383 (patch)
tree416ece9ed53e3350c23a09b381139bdc4cc9c6d7 /sim/frv
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.
Diffstat (limited to 'sim/frv')
-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
4 files changed, 69 insertions, 59 deletions
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
#