sim: frv: scope the unique configure flag
authorMike Frysinger <vapier@gentoo.org>
Tue, 29 Jun 2021 02:23:37 +0000 (22:23 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 17:11:12 +0000 (13:11 -0400)
This will make it possible to merge into the common configure by
making sure we never collide with other arches.

sim/frv/ChangeLog
sim/frv/Makefile.in
sim/frv/configure
sim/frv/configure.ac

index 6db6b66c4514428e1ead02898aebdc5f81509382..c2c5354838e64124dbc99e0ce83fc21dda7710fa 100644 (file)
@@ -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.
index 6fdd6e0f1be3fa360b215a647151fbecf9f3d04f..3a1bbab4e9a558c3ce22c9592590bd6b606fc23b 100644 (file)
@@ -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
 
index dcd1a8763ff6a3c061601e04a097e9fab266aa8f..23fc608783626f9a6a66c1de676e1d0eec3b25f2 100755 (executable)
@@ -590,7 +590,7 @@ sim_reserved_bits
 sim_float
 sim_bitsize
 cgen_breaks
-sim_trapdump
+SIM_FRV_TRAPDUMP_FLAGS
 target_alias
 host_alias
 build_alias
@@ -634,7 +634,7 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_sim_scache
-enable_sim_trapdump
+enable_sim_frv_trapdump
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1248,7 +1248,8 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-sim-scache=size
                           Specify simulator execution cache size
-  --enable-sim-trapdump   Make unknown traps dump the registers
+  --enable-sim-frv-trapdump
+                          Make unknown traps dump the registers
 
 Report bugs to the package provider.
 _ACEOF
@@ -1700,21 +1701,24 @@ 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="";;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sim frv should dump cpu state on unknown traps" >&5
+$as_echo_n "checking whether sim frv should dump cpu state on unknown traps... " >&6; }
+# Check whether --enable-sim-frv-trapdump was given.
+if test "${enable_sim_frv_trapdump+set}" = set; then :
+  enableval=$enable_sim_frv_trapdump; case "${enableval}" in
+yes|no) ;;
+*) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5;;
 esac
-if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
-  echo "Setting sim_trapdump = $sim_trapdump" 6>&1
 fi
+
+if test "x${enable_sim_frv_trapdump}" != xno; then
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=1"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  sim_trapdump=""
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=0"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
index 785a3bc1cc23ce7f7b64047e5a797a1dffceb9c0..7430641101d1bd98e69ae94b5f60dbf05ebd9434 100644 (file)
@@ -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