]> gcc.gnu.org Git - gcc.git/commit
NetBSD/libgcc: Check for TARGET_DL_ITERATE_PHDR in the unwinder
authorMaciej W. Rozycki <macro@linux-mips.org>
Fri, 20 Nov 2020 21:11:22 +0000 (21:11 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Fri, 20 Nov 2020 21:11:22 +0000 (21:11 +0000)
commitf50c417a036697eccfad5a1d6ce777246c77635a
tree9ef1d2bace680c43f0c9a8b6811cfa0fb1c9a185
parentdf90f070378583f295dd972db4400f324752a240
NetBSD/libgcc: Check for TARGET_DL_ITERATE_PHDR in the unwinder

Disable USE_PT_GNU_EH_FRAME frame unwinder support for old OS versions,
fixing compilation errors:

.../libgcc/unwind-dw2-fde-dip.c:75:21: error: unknown type name 'Elf_Phdr'
   75 | # define ElfW(type) Elf_##type
      |                     ^~~~
.../libgcc/unwind-dw2-fde-dip.c:132:9: note: in expansion of macro 'ElfW'
  132 |   const ElfW(Phdr) *p_eh_frame_hdr;
      |         ^~~~
.../libgcc/unwind-dw2-fde-dip.c:75:21: error: unknown type name 'Elf_Phdr'
   75 | # define ElfW(type) Elf_##type
      |                     ^~~~
.../libgcc/unwind-dw2-fde-dip.c:133:9: note: in expansion of macro 'ElfW'
  133 |   const ElfW(Phdr) *p_dynamic;
      |         ^~~~
.../libgcc/unwind-dw2-fde-dip.c:165:37: warning: 'struct dl_phdr_info' declared inside parameter list will not be visible outside of this definition or declaration
  165 | _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
      |                                     ^~~~~~~~~~~~
[...]

and producing a working cross-compiler at least with VAX/NetBSD 1.6.2.

libgcc/
* unwind-dw2-fde-dip.c [__OpenBSD__ || __NetBSD__]
(USE_PT_GNU_EH_FRAME): Do not define if !TARGET_DL_ITERATE_PHDR.
libgcc/unwind-dw2-fde-dip.c
This page took 0.080875 seconds and 5 git commands to generate.