aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-23 21:58:21 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-23 21:58:21 -0400
commit9d90335212595f76b0f29698dfb2468c7318c171 (patch)
treea375141b7c411b117d22b66fe6832d24814abde5
parentb2d14d3d8f5283fbb81603184380e26f5953b25c (diff)
downloadgdb-9d90335212595f76b0f29698dfb2468c7318c171.zip
gdb-9d90335212595f76b0f29698dfb2468c7318c171.tar.gz
gdb-9d90335212595f76b0f29698dfb2468c7318c171.tar.bz2
sim: simplify hardware m4 macro
Every port using this sets the 1st arg to yes and the 2nd arg to "". These are the defaults we probably want anyways in order to unify the codebase, so move them to the macro and only allow ports to declare extra hardware models.
-rw-r--r--sim/ChangeLog6
-rw-r--r--sim/README-HACKING2
-rw-r--r--sim/bfin/ChangeLog5
-rwxr-xr-xsim/bfin/configure8
-rw-r--r--sim/bfin/configure.ac2
-rw-r--r--sim/cris/ChangeLog5
-rwxr-xr-xsim/cris/configure8
-rw-r--r--sim/cris/configure.ac2
-rw-r--r--sim/frv/ChangeLog5
-rwxr-xr-xsim/frv/configure8
-rw-r--r--sim/frv/configure.ac2
-rw-r--r--sim/iq2000/ChangeLog5
-rwxr-xr-xsim/iq2000/configure8
-rw-r--r--sim/iq2000/configure.ac2
-rw-r--r--sim/lm32/ChangeLog5
-rwxr-xr-xsim/lm32/configure8
-rw-r--r--sim/lm32/configure.ac2
-rw-r--r--sim/m32r/ChangeLog5
-rwxr-xr-xsim/m32r/configure8
-rw-r--r--sim/m32r/configure.ac2
-rw-r--r--sim/m4/sim_ac_option_hardware.m414
-rw-r--r--sim/m68hc11/ChangeLog5
-rwxr-xr-xsim/m68hc11/configure9
-rw-r--r--sim/m68hc11/configure.ac2
-rw-r--r--sim/mips/ChangeLog6
-rwxr-xr-xsim/mips/configure13
-rw-r--r--sim/mips/configure.ac5
-rw-r--r--sim/mn10300/ChangeLog5
-rwxr-xr-xsim/mn10300/configure8
-rw-r--r--sim/mn10300/configure.ac2
30 files changed, 78 insertions, 89 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 47032e0..fdeed7d 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * README-HACKING (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * m4/sim_ac_option_hardware.m4 (SIM_AC_OPTION_HARDWARE): Replace [$1]
+ with yes. Delete test [$2]. Change [$3] to [$1]. Update comments.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* m4/sim_ac_common.m4 (SIM_AC_COMMON): Don't check for sys/time.h
diff --git a/sim/README-HACKING b/sim/README-HACKING
index 0a1a3b5..7858058 100644
--- a/sim/README-HACKING
+++ b/sim/README-HACKING
@@ -396,7 +396,7 @@ Hardware Devices
The simplest simulator doesn't include hardware device support. Once you're
ready to move on to the next level, call the common macro in your configure.ac:
-SIM_AC_OPTION_HARDWARE(yes,,devone devtwo devthree)
+SIM_AC_OPTION_HARDWARE(devone devtwo devthree)
The basic hardware API is documented in common/hw-device.h.
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 4473b72..65c96b2 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/bfin/configure b/sim/bfin/configure
index efdeccb..128621c 100755
--- a/sim/bfin/configure
+++ b/sim/bfin/configure
@@ -12081,12 +12081,7 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware \
+hardware="cfi core pal glue \
bfin_cec \
bfin_ctimer \
bfin_dma \
@@ -12119,7 +12114,6 @@ hardware="$hardware \
bfin_wp \
eth_phy \
"
-
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac
index cedd967..8fef4d4 100644
--- a/sim/bfin/configure.ac
+++ b/sim/bfin/configure.ac
@@ -8,7 +8,7 @@ SIM_AC_OPTION_ENDIAN(LITTLE)
SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT)
SIM_AC_OPTION_DEFAULT_MODEL(bf537)
SIM_AC_OPTION_WARNINGS
-SIM_AC_OPTION_HARDWARE(yes,,\
+SIM_AC_OPTION_HARDWARE(\
bfin_cec \
bfin_ctimer \
bfin_dma \
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 07d3086..d123611 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* rvdummy.c: Update includes.
diff --git a/sim/cris/configure b/sim/cris/configure
index 2a615b1..6f0b25e 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -12071,13 +12071,7 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware rv cris cris_900000xx"
-
+hardware="cfi core pal glue rv cris cris_900000xx"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 56afe58..f8aa533 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -15,7 +15,7 @@ SIM_AC_OPTION_ENDIAN(LITTLE)
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_WARNINGS(no)
-SIM_AC_OPTION_HARDWARE(yes,,rv cris cris_900000xx)
+SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx)
# The default model shouldn't matter as long as there's a BFD.
SIM_AC_OPTION_DEFAULT_MODEL(crisv32)
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 339a5f0..bc981ac 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete arguments.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/frv/configure b/sim/frv/configure
index 52a30ab..30c7c81 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -12130,13 +12130,7 @@ fi
-if test """"; then
- hardware=""""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware """
-
+hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index b4f5953..6588fe5 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -27,6 +27,6 @@ if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
fi],[sim_trapdump=""])dnl
AC_SUBST(sim_trapdump)
-SIM_AC_OPTION_HARDWARE(yes,"","")
+SIM_AC_OPTION_HARDWARE
SIM_AC_OUTPUT
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 9857bda..addf3c6 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete arguments.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index df5c33d..21b500c 100755
--- a/sim/iq2000/configure
+++ b/sim/iq2000/configure
@@ -12109,13 +12109,7 @@ fi
-if test """"; then
- hardware=""""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware """
-
+hardware="cfi core pal glue "
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index 1a5dcfb..f21bc80 100644
--- a/sim/iq2000/configure.ac
+++ b/sim/iq2000/configure.ac
@@ -11,6 +11,6 @@ SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_CGEN_MAINT
-SIM_AC_OPTION_HARDWARE(yes,"","")
+SIM_AC_OPTION_HARDWARE
SIM_AC_OUTPUT
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index f421242..6a3287a 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/lm32/configure b/sim/lm32/configure
index 43f006f..4b4b8bc 100755
--- a/sim/lm32/configure
+++ b/sim/lm32/configure
@@ -12108,13 +12108,7 @@ fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware lm32cpu lm32timer lm32uart"
-
+hardware="cfi core pal glue lm32cpu lm32timer lm32uart"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac
index 83ed503..6354887 100644
--- a/sim/lm32/configure.ac
+++ b/sim/lm32/configure.ac
@@ -10,6 +10,6 @@ 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(yes,,lm32cpu lm32timer lm32uart)
+SIM_AC_OPTION_HARDWARE(lm32cpu lm32timer lm32uart)
SIM_AC_OUTPUT
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 6ba7bb4..7fb4761 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/m32r/configure b/sim/m32r/configure
index fb35163..983afc6 100755
--- a/sim/m32r/configure
+++ b/sim/m32r/configure
@@ -12124,13 +12124,7 @@ fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware m32r_cache m32r_uart"
-
+hardware="cfi core pal glue m32r_cache m32r_uart"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac
index 2fd7f72..8ab55bc 100644
--- a/sim/m32r/configure.ac
+++ b/sim/m32r/configure.ac
@@ -24,6 +24,6 @@ SIM_AC_OPTION_CGEN_MAINT
AC_SUBST(traps_obj)
AC_SUBST(sim_extra_cflags)
-SIM_AC_OPTION_HARDWARE(yes,,m32r_cache m32r_uart)
+SIM_AC_OPTION_HARDWARE(m32r_cache m32r_uart)
SIM_AC_OUTPUT
diff --git a/sim/m4/sim_ac_option_hardware.m4 b/sim/m4/sim_ac_option_hardware.m4
index cc84fad..75e331e 100644
--- a/sim/m4/sim_ac_option_hardware.m4
+++ b/sim/m4/sim_ac_option_hardware.m4
@@ -14,18 +14,10 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl
dnl --enable-sim-hardware is for users of the simulator
-dnl arg[1] Enable sim-hw by default? ("yes" or "no")
-dnl arg[2] is a space separated list of devices that override the defaults
-dnl arg[3] is a space separated list of extra target specific devices.
+dnl arg[1] is a space separated list of extra target specific devices.
AC_DEFUN([SIM_AC_OPTION_HARDWARE],
[
-if test "[$2]"; then
- hardware="[$2]"
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware [$3]"
-
+hardware="cfi core pal glue [$1]"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`"
@@ -33,7 +25,7 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/
AC_ARG_ENABLE(sim-hardware,
[AS_HELP_STRING([--enable-sim-hardware=LIST],
[Specify the hardware to be included in the build.])],
- ,[enable_sim_hardware="[$1]"])
+ ,[enable_sim_hardware="yes"])
case ${enable_sim_hardware} in
yes|no) ;;
,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 3da7580..788ecfe 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index 04e56ff..e2e78f8 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -12029,13 +12029,8 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram"
-
+hardware="cfi core pal glue \
+ m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac
index 6148d1d..be52b63 100644
--- a/sim/m68hc11/configure.ac
+++ b/sim/m68hc11/configure.ac
@@ -8,7 +8,7 @@ dnl Options available in this module
SIM_AC_OPTION_ENDIAN(BIG)
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_WARNINGS(no)
-SIM_AC_OPTION_HARDWARE(yes,,
+SIM_AC_OPTION_HARDWARE(\
m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram)
SIM_AC_OUTPUT
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 2e055ec..40c9ad5 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (hw_enabled): Delete.
+ (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/mips/configure b/sim/mips/configure
index bdf659d..85e0832 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -12575,23 +12575,16 @@ sim_micromips_flags=" -F ${sim_micromips_filter} ${sim_micromips_machine} ${si
#
# Add simulated hardware devices
#
-hw_enabled=no
+hw_extra_devices=""
case "${target}" in
mips*tx39*)
- hw_enabled=yes
hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio"
;;
*)
;;
esac
-if test "$hw_devices"; then
- hardware="$hw_devices"
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware $hw_extra_devices"
-
+hardware="cfi core pal glue $hw_extra_devices"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
@@ -12600,7 +12593,7 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
if test "${enable_sim_hardware+set}" = set; then :
enableval=$enable_sim_hardware;
else
- enable_sim_hardware="$hw_enabled"
+ enable_sim_hardware="yes"
fi
case ${enable_sim_hardware} in
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index ec45245..593ee2b 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -426,16 +426,15 @@ AC_SUBST(sim_multi_obj)
#
# Add simulated hardware devices
#
-hw_enabled=no
+hw_extra_devices=""
case "${target}" in
mips*tx39*)
- hw_enabled=yes
hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio"
;;
*)
;;
esac
-SIM_AC_OPTION_HARDWARE($hw_enabled,$hw_devices,$hw_extra_devices)
+SIM_AC_OPTION_HARDWARE($hw_extra_devices)
# Choose simulator engine
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 0ad3257..aa09b2c 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
+ * configure: Regenerate.
+
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index 4c6ad23..f7e634e 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -12110,13 +12110,7 @@ fi
fi
-if test ""; then
- hardware=""
-else
- hardware="cfi core pal glue"
-fi
-hardware="$hardware mn103cpu mn103int mn103tim mn103ser mn103iop"
-
+hardware="cfi core pal glue mn103cpu mn103int mn103tim mn103ser mn103iop"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac
index f8b8ef8..55aec73 100644
--- a/sim/mn10300/configure.ac
+++ b/sim/mn10300/configure.ac
@@ -9,6 +9,6 @@ SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_WARNINGS(no)
SIM_AC_OPTION_RESERVED_BITS
SIM_AC_OPTION_BITSIZE(32,31)
-SIM_AC_OPTION_HARDWARE(yes,,mn103cpu mn103int mn103tim mn103ser mn103iop)
+SIM_AC_OPTION_HARDWARE(mn103cpu mn103int mn103tim mn103ser mn103iop)
SIM_AC_OUTPUT