Message ID | yddbos5xwcl.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Mon, Nov 21, 2011 at 05:40:26PM +0100, Rainer Orth wrote: > 2011-11-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * gcc.c (init_gcc_specs) [USE_SHARED_LIBGCC_FOR_EH]: Always use > libgcc_s. > * config/sol2.h [USE_GLD] (USE_SHARED_LIBGCC_FOR_EH): Define. That's an ugly hack. IMHO we just want to do what has been discussed earlier, ensure that generated EH info and code generation isn't actually pessimized because of the clobbers, at least not in the common cases. Jakub
Hi, On Mon, 21 Nov 2011, Jakub Jelinek wrote: > On Mon, Nov 21, 2011 at 05:40:26PM +0100, Rainer Orth wrote: > > 2011-11-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > > > * gcc.c (init_gcc_specs) [USE_SHARED_LIBGCC_FOR_EH]: Always use > > libgcc_s. > > * config/sol2.h [USE_GLD] (USE_SHARED_LIBGCC_FOR_EH): Define. > > That's an ugly hack. IMHO we just want to do what has been discussed > earlier, ensure that generated EH info and code generation isn't actually > pessimized because of the clobbers, at least not in the common cases. I'm working on something that will hopefully work for the outermost finally block. But it won't be ready today. Ciao, Michael.
# HG changeset patch # Parent 0f811d11987fd90895cf6fda7698d876e59f39a5 Support enforcing use of libgcc_s even with LINK_EH_SPEC diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -182,6 +182,8 @@ along with GCC; see the file COPYING3. --eh-frame-hdr to create the required .eh_frame_hdr sections. */ #if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " +/* Always use libgcc_s. FIXME: Why? */ +#define USE_SHARED_LIBGCC_FOR_EH 1 #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */ #endif diff --git a/gcc/gcc.c b/gcc/gcc.c --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1291,7 +1291,7 @@ init_gcc_specs (struct obstack *obstack, "%{!shared-libgcc:", static_name, " ", eh_name, "}" "%{shared-libgcc:", shared_name, " ", static_name, "}" "}" -#ifdef LINK_EH_SPEC +#if defined(LINK_EH_SPEC) && !USE_SHARED_LIBGCC_FOR_EH "%{shared:" "%{shared-libgcc:", shared_name, "}" "%{!shared-libgcc:", static_name, "}"