Fixup fromcvs/togit conversion
[pkgsrcv2.git] / lang / gcc47 / patches / patch-libgcc_unwind-dw2-fde-dip.c
1 $NetBSD$
2
3 Add dl_iterate_phdr error handling support for all BSDs.  The NetBSD and
4 OpenBSD code will not run until dl_iterate_phdr detection in the configure
5 script is uncommented.
6
7 --- libgcc/unwind-dw2-fde-dip.c.orig    2011-11-02 15:26:35.000000000 +0000
8 +++ libgcc/unwind-dw2-fde-dip.c
9 @@ -54,11 +54,19 @@
10  #endif
11  
12  #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
13 -    && defined(__FreeBSD__) && __FreeBSD__ >= 7
14 +    && defined(TARGET_DL_ITERATE_PHDR) \
15 +    && (defined(__FreeBSD__) || defined(__DragonFly__))
16  # define ElfW __ElfN
17  # define USE_PT_GNU_EH_FRAME
18  #endif
19  
20 +#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
21 +    && defined(TARGET_DL_ITERATE_PHDR) \
22 +    && (defined(__OpenBSD__) || defined(__NetBSD__))
23 +# define ElfW(n) Elf_##n
24 +# define USE_PT_GNU_EH_FRAME
25 +#endif
26 +
27  #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
28      && defined(TARGET_DL_ITERATE_PHDR) \
29      && defined(__sun__) && defined(__svr4__)