This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: lto --pass-through option
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 5 Aug 2014 09:29:44 -0700
- Subject: Re: lto --pass-through option
- Authentication-results: sourceware.org; auth=none
- References: <20140805022225 dot GI8921 at bubble dot grove dot modra dot org>
On Mon, Aug 4, 2014 at 7:22 PM, Alan Modra <amodra@gmail.com> wrote:
> I don't think current BFD ld has any need for this option, which was
> invented before we implemented two passes over input files for LTO.
>
> Nowadays, LTO recompiled objects are inserted after the first input
> file claimed by the plugin, and archives plus as-needed shared libs
> that were on the command line after that point, will be rescanned. So
> --pass-through just causes needless extra scans. Unless I'm missing
> something.. Does anyone have a different opinion?
>
> PR14918
> * plugin.c (plugin_opt_plugin_arg): Drop --pass-through.
>
> diff --git a/ld/plugin.c b/ld/plugin.c
> index cd6ae60..f10c273 100644
> --- a/ld/plugin.c
> +++ b/ld/plugin.c
> @@ -217,6 +217,17 @@ plugin_opt_plugin_arg (const char *arg)
> if (!last_plugin)
> return set_plugin_error (_("<no plugin>"));
>
> + /* Ignore -pass-through= from GCC driver. */
> + if (*arg == '-')
> + {
> + const char *p = arg + 1;
> +
> + if (*p == '-')
> + ++p;
> + if (strncmp (p, "pass-through=", 13) == 0)
> + return 0;
> + }
> +
> newarg = xmalloc (sizeof *newarg);
> newarg->arg = arg;
> newarg->next = NULL;
>
Looks good to me.
Thanks.
--
H.J.