diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-11-25 00:23:39 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-11-25 00:23:39 +0000 |
commit | 50a9972898610dcce11fbdcf1ca6511174644ef5 (patch) | |
tree | ce220916c3a9393736f754f2a780f82ea1166ff5 | |
parent | 5239e966f1e1ef1b164525fa42c341368ed454aa (diff) | |
download | gdb-50a9972898610dcce11fbdcf1ca6511174644ef5.zip gdb-50a9972898610dcce11fbdcf1ca6511174644ef5.tar.gz gdb-50a9972898610dcce11fbdcf1ca6511174644ef5.tar.bz2 |
Build failure on ppc-aix (bfd_elf_get_obj_attr_int is undefined)
bfd_uses_spe_extensions should only be used when BFD has been built
with ELF support. The typical way of checking that in GDB is to use
the HAVE_ELF macro.
gdb/ChangeLog:
* rs6000-tdep.c (bfd_uses_spe_extensions): Use bfd_elf_get_obj_attr_int
only if HAVE_ELF is defined.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 03bf65d..869b8d7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-11-24 Joel Brobecker <brobecker@adacore.com> + + * rs6000-tdep.c (bfd_uses_spe_extensions): Use bfd_elf_get_obj_attr_int + only if HAVE_ELF is defined. + 2010-11-24 Jan Kratochvil <jan.kratochvil@redhat.com> Code cleanup. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 53c3f4c..81a99b6 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3376,6 +3376,7 @@ bfd_uses_spe_extensions (bfd *abfd) if (!abfd) return 0; +#ifdef HAVE_ELF /* Using Tag_GNU_Power_ABI_Vector here is a bit of a hack, as the user could be using the SPE vector abi without actually using any spe bits whatsoever. But it's close enough for now. */ @@ -3383,6 +3384,7 @@ bfd_uses_spe_extensions (bfd *abfd) Tag_GNU_Power_ABI_Vector); if (vector_abi == 3) return 1; +#endif sect = bfd_get_section_by_name (abfd, ".PPC.EMB.apuinfo"); if (!sect) |