aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/config/freebsd.h
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2013-08-07 13:54:01 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-08-07 13:58:28 +0800
commit5e6cdf76af295c9a39b695ca228cff675e8ff4ae (patch)
tree9822016264ef3488c1a80bf220d891cf34238627 /gcc-4.8/gcc/config/freebsd.h
parent34cef20a1108ff399ecbe13f42e1f6bc8c909b27 (diff)
downloadtoolchain_gcc-5e6cdf76af295c9a39b695ca228cff675e8ff4ae.tar.gz
toolchain_gcc-5e6cdf76af295c9a39b695ca228cff675e8ff4ae.tar.bz2
toolchain_gcc-5e6cdf76af295c9a39b695ca228cff675e8ff4ae.zip
[4.8] Always enable --eh-frame-hdr for static executable
See 23e3137ee2897464b051599b85a09f130d3ad05d for the reason why Port patch from http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html gcc/ 2012-09-14 H.J. Lu <hongjiu.lu@intel.com> PR debug/54568 * configure.ac: Add --enable-eh-frame-hdr-for-static. Set USE_EH_FRAME_HDR_FOR_STATIC if PT_GNU_EH_FRAME is supported for static executable. * config.in: Regenerated. * configure: Likewise. * config/gnu-user.h (LINK_EH_SPEC): Defined as "--eh-frame-hdr " if USE_EH_FRAME_HDR_FOR_STATIC is defined. * config/sol2.h (LINK_EH_SPEC): Likewise. * config/openbsd.h (LINK_EH_SPEC): Likewise. * config/alpha/elf.h (LINK_EH_SPEC): Likewise. * config/freebsd.h (LINK_EH_SPEC): Likewise. * config/rs6000/sysv4.h (LINK_EH_SPEC): Likewise. gcc/testsuite/ 2012-09-13 H.J. Lu <hongjiu.lu@intel.com> PR debug/54568 * g++.dg/eh/spec3-static.C: New test. libgcc/ 2012-09-14 H.J. Lu <hongjiu.lu@intel.com> PR debug/54568 * crtstuff.c (USE_PT_GNU_EH_FRAME): Check CRTSTUFFT_O together with USE_EH_FRAME_HDR_FOR_STATIC. Change-Id: If442d27eeb1347ac5a1b943acbbeff5f708a9929
Diffstat (limited to 'gcc-4.8/gcc/config/freebsd.h')
-rw-r--r--gcc-4.8/gcc/config/freebsd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/config/freebsd.h b/gcc-4.8/gcc/config/freebsd.h
index 87c0acf1d..4af2e7cf2 100644
--- a/gcc-4.8/gcc/config/freebsd.h
+++ b/gcc-4.8/gcc/config/freebsd.h
@@ -45,8 +45,12 @@ along with GCC; see the file COPYING3. If not see
#define LIB_SPEC FBSD_LIB_SPEC
#if defined(HAVE_LD_EH_FRAME_HDR)
+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
+#define LINK_EH_SPEC "--eh-frame-hdr "
+#else
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
+#endif
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}"