public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Jack Howarth <howarth.at.gcc@gmail.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	Uros Bizjak <ubizjak@gmail.com>
Subject: Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE
Date: Tue, 31 Mar 2015 05:39:00 -0000	[thread overview]
Message-ID: <20150331053855.GB2121@tucnak.redhat.com> (raw)
In-Reply-To: <CAMe9rOo2ORmyvndySKr3vzEQmZScpKQfnVVw7HW94BXvPFJqdQ@mail.gmail.com>

On Mon, Mar 30, 2015 at 07:08:00PM -0700, H.J. Lu wrote:
> --- a/gcc/gcc.c
> +++ b/gcc/gcc.c
> @@ -1566,11 +1566,13 @@ init_spec (void)
>  	if (in_sep && *p == '-' && strncmp (p, "-lgcc", 5) == 0)
>  	  {
>  	    init_gcc_specs (&obstack,
> +			    "-lgcc_nonshared "
>  			    "-lgcc_s"
>  #ifdef USE_LIBUNWIND_EXCEPTIONS
>  			    " -lunwind"
>  #endif
>  			    ,
> +			    "-lgcc_nonshared "
>  			    "-lgcc",
>  			    "-lgcc_eh"
>  #ifdef USE_LIBUNWIND_EXCEPTIONS
> @@ -1591,7 +1593,9 @@ init_spec (void)
>  	    /* Ug.  We don't know shared library extensions.  Hope that
>  	       systems that use this form don't do shared libraries.  */
>  	    init_gcc_specs (&obstack,
> +			    "libgcc_nonshared.a%s "
>  			    "-lgcc_s",
> +			    "libgcc_nonshared.a%s "
>  			    "libgcc.a%s",
>  			    "libgcc_eh.a%s"

Why do you need to link libgcc_nonshared.a twice here?  -lgcc_s surely won't
add any new __cpu* undefined references.

> @@ -424,3 +424,8 @@ __cpu_indicator_init (void)
>  
>    return 0;
>  }
> +
> +#if defined SHARED && !defined _WIN32
> +__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
> +__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
> +#endif

Will this work on Solaris?
I'd say you at least want to also guard with some configure check if
.symver is supported by assembler.

	Jakub

  parent reply	other threads:[~2015-03-31  5:39 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 [this message]
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
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=20150331053855.GB2121@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=howarth.at.gcc@gmail.com \
    --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).