]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Pass -m* and -v to -plugin-opt
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 4 Jan 2010 00:52:50 +0000 (00:52 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 4 Jan 2010 00:52:50 +0000 (16:52 -0800)
gcc/

2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>

PR lto/42520
* gcc.c (LINK_COMMAND_SPEC): Pass -m* and -v to -plugin-opt.

lto-plugin/

2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>

PR lto/42520
* lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
if -v is passed.

From-SVN: r155601

gcc/ChangeLog
gcc/gcc.c
lto-plugin/ChangeLog
lto-plugin/lto-plugin.c

index 203039f25a2ac5e3345c8fdffd22b3dddd9928e9..6922745d681e52ec8b5259355d3eba2796212696 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR lto/42520
+       * gcc.c (LINK_COMMAND_SPEC): Pass -m* and -v to -plugin-opt.
+
 2009-01-03  Steven Bosscher  <steven@gcc.gnu.org>
 
        PR rtl-optimization/41862
index 068671dd72553d9c1569098673b5c83eb8f4e5f3..a9a10fe7ef00187c20a407575669bd5ca224b9ff 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -786,6 +786,8 @@ proper position among the other output files.  */
     %{O*:-plugin-opt=-O%*} \
     %{w:-plugin-opt=-w} \
     %{f*:-plugin-opt=-f%*} \
+    %{m*:-plugin-opt=-m%*} \
+    %{v:-plugin-opt=-v} \
     } \
     %{flto} %{fwhopr} %l " LINK_PIE_SPEC \
    "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
index 77a8313cd61c21f8579d9de8e95d0e0a890166e5..4848e279397bbd22443582051376fe9e9b58b0bd 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR lto/42520
+       * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
+       if -v is passed.
+
 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR bootstrap/42306
index 4a8a0ff5b7d975c9ddc3db2e8cb9c0f6dd63c657..2fb4f2a778261c47a6fe3b3171d6f94d2c84f0c9 100644 (file)
@@ -369,7 +369,7 @@ add_output_files (FILE *f)
 static void
 exec_lto_wrapper (char *argv[])
 {
-  int t;
+  int t, i;
   int status;
   char *at_args;
   FILE *args;
@@ -394,13 +394,24 @@ exec_lto_wrapper (char *argv[])
   at_args = concat ("@", arguments_file_name, NULL);
   check (at_args, LDPL_FATAL, "could not allocate");
 
+  for (i = 1; argv[i]; i++)
+    {
+      char *a = argv[i];
+      if (a[0] == '-' && a[1] == 'v' && a[2] == '\0')
+       {
+         for (i = 0; argv[i]; i++)
+           fprintf (stderr, "%s ", argv[i]);
+         fprintf (stderr, "\n");
+         break;
+       }
+    }
+
   new_argv[0] = argv[0];
   new_argv[1] = at_args;
   new_argv[2] = NULL;
 
   if (debug)
     {
-      int i;
       for (i = 0; new_argv[i]; i++)
        fprintf (stderr, "%s ", new_argv[i]);
       fprintf (stderr, "\n");