lto --pass-through option

H.J. Lu hjl.tools@gmail.com
Tue Aug 5 16:29:00 GMT 2014


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.



More information about the Binutils mailing list