This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -use-linker-plugin passed to ld


> I agree with H-P.

The attached patch implements that. Tested that it is ignored by cc1
and not passed to the linker. OK with a CL entry if bootstrap finishes
OK?

> --
> Daniel Jacobowitz
> CodeSourcery
>

Cheers,
-- 
Rafael Ãvila de EspÃndola
diff --git a/gcc/common.opt b/gcc/common.opt
index b57234a..9e4cf12 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1391,6 +1391,11 @@ funwind-tables
 Common Report Var(flag_unwind_tables) Optimization
 Just generate unwind tables for exception handling
 
+fuse-linker-plugin
+Common Var(flag_use_linker_plugin)
+Ignored. Is is used by the driver, but passed to the compiler because it starts
+with an f.
+
 fvar-tracking
 Common Report Var(flag_var_tracking) VarExists Optimization
 Perform variable tracking
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 78e0ce8..b033d62 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -770,7 +770,7 @@ proper position among the other output files.  */
 #define LINK_COMMAND_SPEC "\
 %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
     %(linker) \
-    %{use-linker-plugin: \
+    %{fuse-linker-plugin: \
     -plugin %(linker_plugin_file) \
     -plugin-opt=%(lto_wrapper) \
     -plugin-opt=%(lto_gcc) \
@@ -7513,7 +7513,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
   if (num_linker_inputs > 0 && error_count == 0 && print_subprocess_help < 2)
     {
       int tmp = execution_count;
-      const char *use_linker_plugin = "use-linker-plugin";
+      const char *fuse_linker_plugin = "fuse-linker-plugin";
 
       /* We'll use ld if we can't find collect2.  */
       if (! strcmp (linker_name_spec, "collect2"))
@@ -7523,14 +7523,14 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 	    linker_name_spec = "ld";
 	}
 
-      if (switch_matches (use_linker_plugin,
-			  use_linker_plugin + strlen (use_linker_plugin), 0))
+      if (switch_matches (fuse_linker_plugin,
+			  fuse_linker_plugin + strlen (fuse_linker_plugin), 0))
 	{
 	  linker_plugin_file_spec = find_a_file (&exec_prefixes,
 						 "liblto_plugin.so", X_OK,
 						 false);
 	  if (!linker_plugin_file_spec)
-	    fatal ("-use-linker-plugin, but liblto_plugin.so not found");
+	    fatal ("-fuse-linker-plugin, but liblto_plugin.so not found");
 
 	  lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a",
 					 R_OK, true);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]