Merge branch 'v1.4' into v1.5
[librecmc/librecmc.git] / toolchain / gcc / patches / arc-2016.03 / 860-use_eh_frame.patch
1 --- a/libgcc/unwind-dw2-fde-dip.c
2 +++ b/libgcc/unwind-dw2-fde-dip.c
3 @@ -46,33 +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(__FreeBSD__) && __FreeBSD__ >= 7
20 -# define ElfW __ElfN
21 -# define USE_PT_GNU_EH_FRAME
22 -#endif
23 -
24 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
25 -    && defined(__OpenBSD__)
26 -# define ElfW(type) Elf_##type
27 -# define USE_PT_GNU_EH_FRAME
28 -#endif
29 -
30 -#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
31 -    && defined(TARGET_DL_ITERATE_PHDR) \
32 -    && defined(__sun__) && defined(__svr4__)
33 +#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR)
34  # define USE_PT_GNU_EH_FRAME
35 +# ifdef __OpenBSD__
36 +#  define ElfW(type) Elf_##type
37 +# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
38 +#  define ElfW __ElfN
39 +# endif
40  #endif
41  
42  #if defined(USE_PT_GNU_EH_FRAME)