This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
lto --pass-through option
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 5 Aug 2014 11:52:25 +0930
- Subject: lto --pass-through option
- Authentication-results: sourceware.org; auth=none
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;
--
Alan Modra
Australia Development Lab, IBM