This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/14918: linking with -flto always links in libgcc:s.so
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Thu, 6 Dec 2012 06:27:33 -0800
- Subject: PATCH: PR ld/14918: linking with -flto always links in libgcc:s.so
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
-pass-through was needed for OPEN_BFD_RESCAN was implemented:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690
I have been using it in the Linux binutils.
H.J.
----
2012-12-06 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14918
* plugin.c (plugin_opt_plugin_arg): Ignore -pass-through=.
diff --git a/ld/plugin.c b/ld/plugin.c
index da99e77..2966f0f 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -217,6 +220,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;
+ for (p = arg + 1; p; p++)
+ if (*p != '-')
+ break;
+ if (strncmp (p, "pass-through=", 13) == 0)
+ return 0;
+ }
+
newarg = xmalloc (sizeof *newarg);
newarg->arg = arg;
newarg->next = NULL;