diff options
author | Pedro Alves <palves@redhat.com> | 2016-01-05 11:03:40 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-01-05 11:03:40 +0000 |
commit | 976102cd178de0dd6b366746f850b026a2793097 (patch) | |
tree | a932ea2ef31728b3c5700e38851a50ebefa8fdeb /gdb/rs6000-tdep.c | |
parent | 44ddb0c66aa268f0027665da61273e78c9d748ae (diff) | |
download | gdb-976102cd178de0dd6b366746f850b026a2793097.zip gdb-976102cd178de0dd6b366746f850b026a2793097.tar.gz gdb-976102cd178de0dd6b366746f850b026a2793097.tar.bz2 |
Fix PR sim/13418: building with --enable-targets=all fails
Multitarget builds currently fail when:
(1) simulator support is enabled (the main --target supports target sim)
(2) powerpc is included in the --enable-targets list
(3) powerpc is not the main/default target (--target)
This is because the powerpc sim provides a non-standard API function
sim_spr_register_name which gdb/rs6000-tdep.c utilizes. Since the sim
does not yet support multitarget, only the sim (if one exists) for the
main target is built. When that target isn't powerpc, this function
is not available leading to linking errors:
rs6000-tdep.c:(.text+0x1e34d): undefined reference to
`sim_spr_register_name'
Fix this by only using that API if the sim linked in is the powerpc
sim.
gdb/ChangeLog:
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.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |