aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-01-10 21:53:27 +0000
committerMike Frysinger <vapier@gentoo.org>2011-01-10 21:53:27 +0000
commitcb11d1f450c9319dbce0018bf3e41acf675f4a39 (patch)
treefc1f26207365fcaed1abbe724ca8560ec3acd033 /sim
parent5f78776ab10ca691df6a39760795257e30121be5 (diff)
downloadgdb-cb11d1f450c9319dbce0018bf3e41acf675f4a39.zip
gdb-cb11d1f450c9319dbce0018bf3e41acf675f4a39.tar.gz
gdb-cb11d1f450c9319dbce0018bf3e41acf675f4a39.tar.bz2
sim: fix handling of 2nd arg to SIM_AC_OPTION_HARDWARE
The 2nd arg to SIM_AC_OPTION_HARDWARE is described as "a space separated list of devices that override the defaults" while the 3rd arg is "a space separated list of extra target specific devices". But the macro doesn't seem to treat the 2nd arg this way. Instead, it will always add the default list of devices, and only add the extra target specific devices if the 2nd arg is not specified. So rework the logic slightly to handle the 2nd arg as documented. This shouldn't affect any targets in the tree as no one passes in a non- empty value as the 2nd arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog7
-rw-r--r--sim/common/aclocal.m45
2 files changed, 9 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 04ea93b..b3d600e 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,4 +1,9 @@
-2010-01-10 Mike Frysinger <vapier@gentoo.org>
+2011-01-10 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set $hardware to $2 when $2 is
+ not empty, and always append $3 to $hardware.
+
+2011-01-10 Mike Frysinger <vapier@gentoo.org>
* hw-device.h (hw_abort, hw_vabort, hw_halt): Add noreturn attribute.
* sim-hw.h (sim_hw_abort): Likewise.
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 9a6a4c8..bda20ce 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -571,10 +571,11 @@ else
sim_hw_p=no
fi
if test "[$2]"; then
- hardware="core pal glue"
+ hardware="[$2]"
else
- hardware="core pal glue [$3]"
+ hardware="core pal glue"
fi
+hardware="$hardware [$3]"
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'`"