This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Add -flto and -flto-partition= to ld
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Sun, 5 Dec 2010 20:03:36 -0800
- Subject: PATCH: Add -flto and -flto-partition= to ld
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
collect-ld may be called with -flto and -flto-partition= options. This
patch adds them to ld so that we can debug ld plugin by cuting/pasting
the the same command line passed to collect-ld. OK to install?
Thanks.
H.J.
----
2010-12-05 H.J. Lu <hongjiu.lu@intel.com>
* lexsup.c (ld_options): Add -flto and -flto-partition= for
GCC LTO option compatibility.
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 722bbf6..94fa2cd 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -283,6 +283,12 @@ static const struct ld_option ld_options[] =
'\0', N_("PLUGIN"), N_("Load named plugin"), ONE_DASH },
{ {"plugin-opt", required_argument, NULL, OPTION_PLUGIN_OPT},
'\0', N_("ARG"), N_("Send arg to last-loaded plugin"), ONE_DASH },
+ { {"flto", optional_argument, NULL, OPTION_IGNORE},
+ '\0', NULL, N_("Ignored for GCC LTO option compatibility"),
+ ONE_DASH },
+ { {"flto-partition=", required_argument, NULL, OPTION_IGNORE},
+ '\0', NULL, N_("Ignored for GCC LTO option compatibility"),
+ ONE_DASH },
#endif /* ENABLE_PLUGINS */
{ {"Qy", no_argument, NULL, OPTION_IGNORE},
'\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },