public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Patrick Marlier <patrick.marlier@gmail.com>
To: Jack Howarth <howarth@bromo.med.uc.edu>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	 Richard Henderson <rth@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [libitm] Link eh-1.exe with -shared-libgcc on Solaris (PR libitm/51822)
Date: Mon, 30 Jan 2012 17:24:00 -0000	[thread overview]
Message-ID: <4F26D237.5030002@gmail.com> (raw)
In-Reply-To: <20120130171511.GA825@bromo.med.uc.edu>

On 01/30/2012 12:15 PM, Jack Howarth wrote:
> On Mon, Jan 30, 2012 at 05:40:21PM +0100, Rainer Orth wrote:
>> Richard Henderson<rth@redhat.com>  writes:
>>
>>> On 01/25/2012 12:03 AM, Rainer Orth wrote:
>>>>> Er.. how did we get two copies?
>>>>
>>>> The link line boils down to
>>>>
>>>> ld -o eh-1.exe crt1.o crti.o crtbegin.o eh-1.o -litm -lstdc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o
>>>>
>>>> The eh-1.o reference to _Unwind_Resume drags in one copy of the unwinder
>>>> from libgcc_eh.a, while libstdc++.so is linked against libgcc_s.so.1,
>>>> providing another copy.
>>>
>>> So... are we linking with the gcc binary, not the g++ binary?
>>> Because I thought -shared-libgcc is the default for C++.
>>>
>>> If this goes too far down a rat-hole, your original patch is ok.
>>
>> The compiler used is currently set in libitm.exp (libitm_init) without
>> considering the language used.  Changing this seems too risky for
>> stage4.  I think we can get away with the following patch instead, which
>> hardcodes -shared-libgcc for C++.  I think it is safe even with
>> --disable-shared since -shared-libgcc is simply ignored AFAICS, and is
>> already used unconditionally in libffi.special/special.exp.
>>
>> Tested on i386-pc-solaris2.11.
>
> FYI, this fix has no impact on the eh-1.C execution failures seen at -m32/-m64 on x86_64 darwin10/11
> when built with Xcode 4.2(.1).

Problem was discussed here and not same problem as above:
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00329.html
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00285.html

--
Patrick.

  parent reply	other threads:[~2012-01-30 17:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 17:08 Rainer Orth
2012-01-23  0:46 ` Richard Henderson
2012-01-24 13:03   ` Rainer Orth
2012-01-24 18:48     ` Richard Henderson
2012-01-25  9:57       ` Rainer Orth
2012-01-30 16:40       ` Rainer Orth
2012-01-30 17:15         ` Jack Howarth
2012-01-30 17:24           ` Rainer Orth
2012-01-30 17:24           ` Patrick Marlier [this message]
2012-01-30 20:47             ` Jack Howarth
2012-01-30 20:29         ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F26D237.5030002@gmail.com \
    --to=patrick.marlier@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=howarth@bromo.med.uc.edu \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).