public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Michael Matz <matz@suse.de>
Cc: gcc-patches@gcc.gnu.org,
	Rainer Orth <ro@cebitec.uni-bielefeld.de>,
		Richard Guenther <rguenther@suse.de>
Subject: Re: [build, lto] Only accept -fuse-linker-plugin if linker supports -plugin (PR lto/46944)
Date: Sat, 26 Mar 2011 11:15:00 -0000	[thread overview]
Message-ID: <AANLkTikOqnfswfmSoGkeEZdMrbaet4UP4BfaSebtAods@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1103260341510.19760@wotan.suse.de>

On Sat, Mar 26, 2011 at 3:51 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> [sorry for breaking the threading I've deleted the mails I'm answering
> already]
>
> In any case, citing from
>  http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01250.html
>
>> Here's the patch I came up with.  It is on top of the previous one, so
>> if we want to backport to 4.6 later, both are necessary.
>>
>> It also fixes a typo in the in_tree_ld case, which can never have
>> worked.
>>
>> Tested by i386-pc-solaris2.11 bootstraps with either Sun ld or gld 2.21,
>> and by configuring with Sun ld --with-plugin-ld=gld-2.21 and obvserving
>> HAVE_LTO_PLUGIN being set to 1.
> ...
>> @@ -3207,6 +3207,10 @@
>>      elif test "$ld_is_gold" = yes -a "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 20; then
>>        gcc_cv_lto_plugin=1
>>      fi
>> +  elif test x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" != x"$gcc_cv_ld"; then
>> +    # Allow -fuse-linker-plugin if plugin linker differs from
>> +    # default/specified linker.
>> +    gcc_cv_lto_plugin=1
>>    fi
>>  fi
>
> And this '1' is a problem.  Even if I specify
> --with-plugin-ld=some-good-ld (i.e. it can be reasonably assumed that I
> know what I'm doing) the above forces me to still have to use
> -fuse-linker-plugin when I really want to use it.  This is because the
> introduction of three levels of HAVE_LTO_PLUGIN: 0 (-fuse-linker-plugin
> not allowed), 1 (allowed but not default for -flto), 2 (allowed and
> default to on with -flto).
>
> I think if the plugin linker is different from the normal linker we should
> set HAVE_LTO_PLUGIN to 2.

I think we should do the linker version checks which relate to linker-plugin
use on the plugin-linker instead.  So if I specify a separate but known
buggy linker I don't want it to be used by default.

Richard.

>
> Ciao,
> Michael.
>

  reply	other threads:[~2011-03-26 11:13 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26  3:26 Michael Matz
2011-03-26 11:15 ` Richard Guenther [this message]
2011-03-28 10:20   ` Rainer Orth
2011-03-28 10:50     ` Richard Guenther
2011-04-04 16:16   ` Rainer Orth
2011-04-11 13:26     ` Rainer Orth
2011-04-18 18:34     ` Ralf Wildenhues
2011-04-19 17:53       ` Rainer Orth
2011-04-26 16:01         ` Rainer Orth
2011-04-26 22:27           ` Ralf Wildenhues
2011-04-27 14:36             ` Rainer Orth
2011-04-19 12:28     ` Paolo Bonzini
2011-04-19 17:57       ` Rainer Orth
2011-05-30 10:27     ` Rainer Orth
2011-05-30 10:45       ` Richard Guenther
  -- strict thread matches above, loose matches on Subject: below --
2011-02-07 12:11 Rainer Orth
2011-02-14 19:44 ` Ralf Wildenhues
2011-03-10 11:26 ` Rainer Orth
2011-03-10 11:51   ` Paolo Bonzini
2011-03-10 12:26   ` Richard Guenther
2011-03-10 16:51     ` Rainer Orth
2011-03-10 17:06       ` Richard Guenther
2011-03-10 18:28         ` Rainer Orth
2011-03-11 12:30           ` Richard Guenther
2011-03-11 14:37             ` Rainer Orth
2011-03-11 15:10               ` Richard Guenther
2011-03-11 15:18                 ` Rainer Orth
2011-03-11 15:32                   ` Richard Guenther
2011-03-11 15:35                     ` Rainer Orth
2011-03-14 19:07                     ` Rainer Orth
2011-03-15  9:42                       ` Richard Guenther
2011-03-16  9:23                         ` Rainer Orth
2011-03-16  9:27                           ` Paolo Bonzini
2011-03-16  9:43                             ` Rainer Orth
2011-03-18  9:27                         ` Rainer Orth
2011-03-18 10:09                           ` Richard Guenther
2011-03-18 10:16                             ` Rainer Orth
2011-03-18 10:19                               ` Richard Guenther
2011-03-18 10:23                                 ` Rainer Orth
2011-03-18 10:34                                   ` Richard Guenther
2011-03-21 10:18                                 ` Rainer Orth
2011-03-21 10:27                                   ` Paolo Bonzini
2011-03-21 10:27                                   ` Richard Guenther

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=AANLkTikOqnfswfmSoGkeEZdMrbaet4UP4BfaSebtAods@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=rguenther@suse.de \
    --cc=ro@cebitec.uni-bielefeld.de \
    /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).