aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/libgcc/crtstuff.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-08-07 14:07:56 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-08-07 14:10:19 +0800
commit3cbd714aa558ccb83ed8294779d9dcd4399dd24f (patch)
tree4fb3cd936d88cc6a8f6f96871f341af7e6c6580e /gcc-4.7/libgcc/crtstuff.c
parent34cef20a1108ff399ecbe13f42e1f6bc8c909b27 (diff)
downloadtoolchain_gcc-3cbd714aa558ccb83ed8294779d9dcd4399dd24f.tar.gz
toolchain_gcc-3cbd714aa558ccb83ed8294779d9dcd4399dd24f.tar.bz2
toolchain_gcc-3cbd714aa558ccb83ed8294779d9dcd4399dd24f.zip
[4.6,4.7] Always enable --eh-frame-hdr for static executable
See 23e3137ee2897464b051599b85a09f130d3ad05d for the reason why. backport 4.8 patch from http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html Change-Id: I9496e11f314e5e2ec9359b993016723ab6366dad
Diffstat (limited to 'gcc-4.7/libgcc/crtstuff.c')
-rw-r--r--gcc-4.7/libgcc/crtstuff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc-4.7/libgcc/crtstuff.c b/gcc-4.7/libgcc/crtstuff.c
index 5d820fa45..0e31f1988 100644
--- a/gcc-4.7/libgcc/crtstuff.c
+++ b/gcc-4.7/libgcc/crtstuff.c
@@ -84,7 +84,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
@@ -93,7 +94,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
@@ -102,7 +104,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.