aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure10
-rw-r--r--gdb/configure.ac8
-rw-r--r--gdb/rs6000-tdep.c2
5 files changed, 30 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3d8923b..b10aa04 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2016-01-05 Pedro Alves <palves@redhat.com>
+
+ PR sim/13418
+ * configure.ac: Define WITH_PPC_SIM when linking in the sim and
+ the target is powerpc*.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
diff --git a/gdb/config.in b/gdb/config.in
index ccc0098..6196fa0 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -758,6 +758,9 @@
when building for Cygwin. */
#undef USE_WIN32API
+/* Define if the PPC simulator is being linked in. */
+#undef WITH_PPC_SIM
+
/* Define if --with-python provides a path, either directly or via
python-config.py --exec-prefix. */
#undef WITH_PYTHON_PATH
diff --git a/gdb/configure b/gdb/configure
index 5afdbbc..15383d6 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15846,6 +15846,16 @@ if test "${ignore_sim}" = "false"; then
$as_echo "#define WITH_SIM 1" >>confdefs.h
+
+ # Some tdep code should only be compiled in when the ppc sim is
+ # built. PR sim/13418.
+ case $target in
+ powerpc*-*-*)
+
+$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
+
+ ;;
+ esac
fi
fi
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 5b618c9..d102640 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2260,6 +2260,14 @@ if test "${ignore_sim}" = "false"; then
SIM="${gdb_sim}"
SIM_OBS="remote-sim.o"
AC_DEFINE(WITH_SIM, 1, [Define if the simulator is being linked in.])
+
+ # Some tdep code should only be compiled in when the ppc sim is
+ # built. PR sim/13418.
+ case $target in
+ powerpc*-*-*)
+ AC_DEFINE(WITH_PPC_SIM, 1, [Define if the PPC simulator is being linked in.])
+ ;;
+ esac
fi
fi
AC_SUBST(SIM)
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 47b0749..599b076 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -328,7 +328,7 @@ init_sim_regno_table (struct gdbarch *arch)
set_sim_regno (sim_regno, tdep->ppc_acc_regnum, sim_ppc_acc_regnum);
/* spefscr is a special-purpose register, so the code below handles it. */
-#ifdef WITH_SIM
+#ifdef WITH_PPC_SIM
/* Now handle all special-purpose registers. Verify that they
haven't mistakenly been assigned numbers by any of the above
code. */