aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2014-04-14 15:59:47 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 16:16:33 -0700
commitc16207898bba39af7a6ec6159ceee8623dcfb951 (patch)
treeaedbd5b68b2e3f6c0a22d0ff9c1237e35ee58852 /gcc-4.9/libgcc
parent5399988ba7d9906878c5f5b6d9390e3595a6e915 (diff)
downloadtoolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.tar.gz
toolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.tar.bz2
toolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.zip
[4.9] Always enable --eh-frame-hdr for static executable
See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and 23e3137ee2897464b051599b85a09f130d3ad05d Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
Diffstat (limited to 'gcc-4.9/libgcc')
-rw-r--r--gcc-4.9/libgcc/crtstuff.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc-4.9/libgcc/crtstuff.c b/gcc-4.9/libgcc/crtstuff.c
index 12bed4b35..5664347f4 100644
--- a/gcc-4.9/libgcc/crtstuff.c
+++ b/gcc-4.9/libgcc/crtstuff.c
@@ -82,7 +82,8 @@ call_ ## FUNC (void) \
#if defined(OBJECT_FORMAT_ELF) \
&& !defined(OBJECT_FORMAT_FLAT) \
&& defined(HAVE_LD_EH_FRAME_HDR) \
- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
+ && !defined(inhibit_libc) \
+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
&& defined(__FreeBSD__) && __FreeBSD__ >= 7
#include <link.h>
# define USE_PT_GNU_EH_FRAME
@@ -91,7 +92,8 @@ call_ ## FUNC (void) \
#if defined(OBJECT_FORMAT_ELF) \
&& !defined(OBJECT_FORMAT_FLAT) \
&& defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) \
- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
+ && !defined(inhibit_libc) \
+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
&& defined(__sun__) && defined(__svr4__)
#include <link.h>
# define USE_PT_GNU_EH_FRAME
@@ -100,7 +102,8 @@ call_ ## FUNC (void) \
#if defined(OBJECT_FORMAT_ELF) \
&& !defined(OBJECT_FORMAT_FLAT) \
&& defined(HAVE_LD_EH_FRAME_HDR) \
- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
+ && !defined(inhibit_libc) \
+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
&& defined(__GLIBC__) && __GLIBC__ >= 2
#include <link.h>
/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
@@ -115,7 +118,7 @@ call_ ## FUNC (void) \
#if defined(OBJECT_FORMAT_ELF) \
&& !defined(OBJECT_FORMAT_FLAT) \
&& defined(HAVE_LD_EH_FRAME_HDR) \
- && !defined(CRTSTUFFT_O) \
+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
&& defined(inhibit_libc) \
&& (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__))
/* On systems using glibc, an inhibit_libc build of libgcc is only