mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-28 14:24:43 +08:00
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.
This commit is contained in:
parent
df90f07037
commit
f50c417a03
@ -71,6 +71,7 @@
|
||||
#endif
|
||||
|
||||
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
&& defined(TARGET_DL_ITERATE_PHDR) \
|
||||
&& (defined(__OpenBSD__) || defined(__NetBSD__))
|
||||
# define ElfW(type) Elf_##type
|
||||
# define USE_PT_GNU_EH_FRAME
|
||||
|
Loading…
Reference in New Issue
Block a user