public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: frv: scope the unique configure flag
@ 2021-06-30 17:25 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-06-30 17:25 UTC (permalink / raw)
  To: gdb-patches

This will make it possible to merge into the common configure by
making sure we never collide with other arches.
---
 sim/frv/ChangeLog    |  6 ++++++
 sim/frv/Makefile.in  |  2 +-
 sim/frv/configure    | 34 +++++++++++++++++++---------------
 sim/frv/configure.ac | 28 +++++++++++++++-------------
 4 files changed, 41 insertions(+), 29 deletions(-)

diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 6db6b66c4514..c2c5354838e6 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+	* Makefile.in (SIM_EXTRA_CFLAGS): Change to SIM_FRV_TRAPDUMP_FLAGS.
+	* configure.ac: Change sim-trapdump to sim-frv-trapdump.
+	* configure: Regenerate.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac: Delete SIM_AC_OPTION_DEFAULT_MODEL call.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 6fdd6e0f1be3..3a1bbab4e9a5 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -36,7 +36,7 @@ SIM_EXTRA_DEPS = \
 	registers.h profile.h eng.h \
 	$(sim-options_h)
 
-SIM_EXTRA_CFLAGS = @sim_trapdump@
+SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@
 
 SIM_EXTRA_CLEAN = frv-clean
 
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index 785a3bc1cc23..7430641101d1 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -4,20 +4,22 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_OPTION_SCACHE(16384)
 
-#
-# Enable making unknown traps dump out registers
-#
-AC_ARG_ENABLE(sim-trapdump,
-[AS_HELP_STRING([--enable-sim-trapdump],
+dnl Enable making unknown traps dump out registers
+AC_MSG_CHECKING([whether sim frv should dump cpu state on unknown traps])
+AC_ARG_ENABLE(sim-frv-trapdump,
+[AS_HELP_STRING([--enable-sim-frv-trapdump],
 		[Make unknown traps dump the registers])],
 [case "${enableval}" in
-  yes) sim_trapdump="-DTRAPDUMP=1";;
-  no)  sim_trapdump="-DTRAPDUMP=0";;
-  *)   AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-trapdump"); sim_trapdump="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
-  echo "Setting sim_trapdump = $sim_trapdump" 6>&1
-fi],[sim_trapdump=""])dnl
-AC_SUBST(sim_trapdump)
+yes|no) ;;
+*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-trapdump");;
+esac])
+if test "x${enable_sim_frv_trapdump}" != xno; then
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=1"
+  AC_MSG_RESULT([yes])
+else
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=0"
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST(SIM_FRV_TRAPDUMP_FLAGS)
 
 SIM_AC_OUTPUT
-- 
2.31.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-30 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 17:25 [PATCH] sim: frv: scope the unique configure flag Mike Frysinger

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