aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-03-23 15:03:01 +0000
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-03-23 15:03:01 +0000
commit3fd38161b37ab7ff2096528b3fb68bd5e41db31f (patch)
tree8f31db8b195dd27b90fb0cf8807808caf336fad4 /sim
parentb5981e5adfd788f7cc7c062a8734a8311efda010 (diff)
downloadgdb-3fd38161b37ab7ff2096528b3fb68bd5e41db31f.zip
gdb-3fd38161b37ab7ff2096528b3fb68bd5e41db31f.tar.gz
gdb-3fd38161b37ab7ff2096528b3fb68bd5e41db31f.tar.bz2
2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* acinclude.m4: Add SIM_DV_SOCKSER_O which is empty on hosts which do not support dv-sockser.o. Add always as option to first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware is always required to be enabled by simulator.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog7
-rw-r--r--sim/common/acinclude.m418
2 files changed, 23 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 6498668..9daab66 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * acinclude.m4: Add SIM_DV_SOCKSER_O which is empty on hosts
+ which do not support dv-sockser.o. Add always as option to
+ first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware
+ is always required to be enabled by simulator.
+
2012-08-28 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
* gennltvals.sh: Use libgloss/syscall.h for cr16.
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index b6ebf15..7f98903 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -603,12 +603,12 @@ AC_SUBST(sim_default_model)
dnl --enable-sim-hardware is for users of the simulator
-dnl arg[1] Enable sim-hw by default? ("yes" or "no")
+dnl arg[1] Enable sim-hw by default? ("yes", "no", or "always")
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.
AC_DEFUN([SIM_AC_OPTION_HARDWARE],
[
-if test x"[$1]" = x"yes"; then
+if test x"[$1]" != x"no"; then
sim_hw_p=yes
else
sim_hw_p=no
@@ -647,11 +647,25 @@ else
*) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
esac
done
+ # mingw does not support sockser
+ SIM_DV_SOCKSER_O=""
+ case ${host} in
+ *mingw*) ;;
+ *) SIM_DV_SOCKSER_O="dv-sockser.o"
+ AC_DEFINE_UNQUOTED(
+ [HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.])
+ ;;
+ esac
+ AC_SUBST(SIM_DV_SOCKSER_O)
fi
if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
fi],[
if test "$sim_hw_p" != yes; then
+ if test "[$1]" = "always"; then
+ AC_MSG_ERROR([Sorry, but this simulator requires that hardware support
+be enabled. Please configure without --disable-hw-support.])
+ fi
sim_hw_objs=
sim_hw_cflags="-DWITH_HW=0"
sim_hw=