From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>,
Mike Stump <mikestump@comcast.net>,
Jack Howarth <howarth.at.gcc@gmail.com>,
Ian Lance Taylor <ian@airs.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Iain Sandoe <iain@codesourcery.com>,
Rainer Orth <ro@cebitec.uni-bielefeld.de>
Subject: Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE
Date: Fri, 17 Apr 2015 11:48:00 -0000 [thread overview]
Message-ID: <CAMe9rOpGbB=UuSg3s437FaedD_mugzYKffdrJJfZEHVQQEBODQ@mail.gmail.com> (raw)
In-Reply-To: <20150417113731.GL1725@tucnak.redhat.com>
On Fri, Apr 17, 2015 at 4:37 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Apr 17, 2015 at 01:04:20PM +0200, Uros Bizjak wrote:
>> On Fri, Apr 17, 2015 at 12:36 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> >>>>> I can confirm that the most current patch bootstraps on
>> >>>>> x86_64-apple-darwin14 and that all of the new tests show up as
>> >>>>> unsupported in the test suite.
>> >>>>> Jack
>> >>>>
>> >>>> I am re-posting this patch. OK for trunk?
>> >>>
>> >>> If Jack is happy, I’m happy. :-) That leaves the x86 people to comment on it.
>> >>
>> >> What about Solaris?
>> >>
>> >> Uros.
>> >
>> > There are
>>
>> [...]
>>
>> Assuming Jakub is OK with the patch, let's go ahead with it.
>>
>> OK for mainline.
>
> I don't like it. Nonshared libgcc is libgcc.a, period. No sense in
> creating yet another library for that.
> So, IMHO beyond making the __cpu* entrypoints compat symbols only (@ instead
> of @@ symbol versions) the right fix is simply tweak init_gcc_spec, so that
> static_name is always linked in, in the switch combinations that it isn't
> right now of course after shared_name rather than before that.
> I thought we've fixed that years ago...
>
We never pass -lgcc to linker when building C++ DSO:
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccZC7iqy.res
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed
--eh-frame-hdr --hash-style=gnu -m elf_x86_64 -shared
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbeginS.o
-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. x.o -lstdc++ -lm
-lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtendS.o
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
[hjl@gnu-32 tmp]$
That is why libgcc_nonshared.a is needed.
--
H.J.
next prev parent reply other threads:[~2015-04-17 11:48 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 2:25 H.J. Lu
2015-03-30 2:34 ` H.J. Lu
2015-03-30 2:40 ` H.J. Lu
2015-03-30 22:26 ` H.J. Lu
2015-03-31 0:54 ` Jack Howarth
2015-03-31 2:08 ` H.J. Lu
2015-03-31 2:42 ` H.J. Lu
2015-03-31 3:14 ` Jack Howarth
2015-03-31 3:09 ` Jack Howarth
2015-03-31 4:04 ` H.J. Lu
2015-03-31 5:39 ` Jakub Jelinek
2015-03-31 6:20 ` Rainer Orth
2015-03-31 10:39 ` H.J. Lu
2015-03-31 14:25 ` Jack Howarth
2015-03-31 15:58 ` H.J. Lu
2015-03-31 16:10 ` Jack Howarth
2015-03-31 16:15 ` H.J. Lu
2015-03-31 16:39 ` Jack Howarth
2015-03-31 17:00 ` H.J. Lu
2015-03-31 18:33 ` Jack Howarth
2015-04-14 15:07 ` H.J. Lu
2015-04-16 16:29 ` Mike Stump
2015-04-17 8:05 ` Uros Bizjak
2015-04-17 10:36 ` H.J. Lu
2015-04-17 11:04 ` Uros Bizjak
2015-04-17 11:12 ` Uros Bizjak
2015-04-17 11:38 ` Jakub Jelinek
2015-04-17 11:48 ` H.J. Lu [this message]
2015-04-17 12:00 ` Jakub Jelinek
2015-04-17 12:36 ` H.J. Lu
2015-04-17 12:40 ` Jakub Jelinek
2015-05-08 23:00 ` Rich Felker
2015-05-08 23:59 ` H.J. Lu
2015-05-09 14:31 ` Szabolcs Nagy
2015-05-09 17:41 ` H.J. Lu
2015-05-09 18:57 ` Szabolcs Nagy
2015-05-11 10:20 ` Szabolcs Nagy
2015-05-11 10:32 ` Jakub Jelinek
2015-05-11 12:39 ` Szabolcs Nagy
2015-05-11 13:05 ` Jakub Jelinek
2015-05-11 15:30 ` Szabolcs Nagy
2015-05-11 14:12 ` Rich Felker
2015-05-09 19:36 ` Rich Felker
2015-05-09 19:54 ` Jakub Jelinek
2015-07-22 21:14 ` Sriraman Tallam
2015-04-17 12:23 ` Mike Stump
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='CAMe9rOpGbB=UuSg3s437FaedD_mugzYKffdrJJfZEHVQQEBODQ@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=howarth.at.gcc@gmail.com \
--cc=iain@codesourcery.com \
--cc=ian@airs.com \
--cc=jakub@redhat.com \
--cc=mikestump@comcast.net \
--cc=ro@cebitec.uni-bielefeld.de \
--cc=ubizjak@gmail.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).