toolchain: gcc: add gcc 5.2.0
[openwrt.git] / toolchain / gcc / patches / 5.2.0 / 860-use_eh_frame.patch
1 --- a/libgcc/unwind-dw2-fde-dip.c
2 +++ b/libgcc/unwind-dw2-fde-dip.c
3 @@ -46,34 +46,13 @@
4  #include "unwind-compat.h"
5  #include "gthr.h"
6  
7 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
8 -    && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
9 -       || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
10 -# define USE_PT_GNU_EH_FRAME
11 -#endif
12 -
13 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
14 -    && defined(__BIONIC__)
15 -# define USE_PT_GNU_EH_FRAME
16 -#endif
17 -
18 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
19 -    && defined(TARGET_DL_ITERATE_PHDR) \
20 -    && (defined(__DragonFly__) || defined(__FreeBSD__))
21 -# define ElfW __ElfN
22 -# define USE_PT_GNU_EH_FRAME
23 -#endif
24 -
25 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
26 -    && defined(__OpenBSD__)
27 -# define ElfW(type) Elf_##type
28 -# define USE_PT_GNU_EH_FRAME
29 -#endif
30 -
31 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
32 -    && defined(TARGET_DL_ITERATE_PHDR) \
33 -    && defined(__sun__) && defined(__svr4__)
34 +#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR)
35  # define USE_PT_GNU_EH_FRAME
36 +# ifdef __OpenBSD__
37 +#  define ElfW(type) Elf_##type
38 +# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
39 +#  define ElfW __ElfN
40 +# endif
41  #endif
42  
43  #if defined(USE_PT_GNU_EH_FRAME)