diff mbox

Enable -fuse-linker-plugin by default when possible

Message ID 20101129142434.GB8909@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Nov. 29, 2010, 2:24 p.m. UTC
> 
> If possible, that would surely be nice.
Hi,
here is patch.  We still get lto1 command lines so --verbose is useful for debugging. Only the collect-ld
invocation gets hidden (and can be enabled with -Wl,-v). OK?

Bootstrapped/regtested x86_64-linux, OK?
Honza

	* collect2.c (main): Do not imply verbose output with LTO and linker plugin.

Comments

Richard Biener Nov. 29, 2010, 2:38 p.m. UTC | #1
On Mon, 29 Nov 2010, Jan Hubicka wrote:

> > 
> > If possible, that would surely be nice.
> Hi,
> here is patch.  We still get lto1 command lines so --verbose is useful for debugging. Only the collect-ld
> invocation gets hidden (and can be enabled with -Wl,-v). OK?
> 
> Bootstrapped/regtested x86_64-linux, OK?

Ok.

Thanks,
Richard.

> Honza
> 
> 	* collect2.c (main): Do not imply verbose output with LTO and linker plugin.
> 
> Index: collect2.c
> ===================================================================
> --- collect2.c	(revision 167240)
> +++ collect2.c	(working copy)
> @@ -1150,8 +1150,6 @@ main (int argc, char **argv)
>    int num_c_args;
>    char **old_argv;
>  
> -  bool use_verbose = false;
> -
>    old_argv = argv;
>    expandargv (&argc, &argv);
>    if (argv != old_argv)
> @@ -1210,14 +1208,10 @@ main (int argc, char **argv)
>  	  no_partition = true;
>          else if ((! strncmp (argv[i], "-flto=", 6)
>  		  || ! strcmp (argv[i], "-flto")) && ! use_plugin)
> -	  {
> -	    use_verbose = true;
> -	    lto_mode = LTO_MODE_WHOPR;
> -	  }
> +	  lto_mode = LTO_MODE_WHOPR;
>          else if (! strcmp (argv[i], "-plugin"))
>  	  {
>  	    use_plugin = true;
> -	    use_verbose = true;
>  	    lto_mode = LTO_MODE_NONE;
>  	  }
>  #ifdef COLLECT_EXPORT_LIST
> @@ -1432,11 +1426,6 @@ main (int argc, char **argv)
>  	      *c_ptr++ = xstrdup (q);
>  	    }
>  	}
> -      if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
> -	{
> -	  /* Turn on trace in collect2 if needed.  */
> -	  vflag = true;
> -	}
>      }
>    obstack_free (&temporary_obstack, temporary_firstobj);
>    *c_ptr++ = "-fno-profile-arcs";
> 
>
diff mbox

Patch

Index: collect2.c
===================================================================
--- collect2.c	(revision 167240)
+++ collect2.c	(working copy)
@@ -1150,8 +1150,6 @@  main (int argc, char **argv)
   int num_c_args;
   char **old_argv;
 
-  bool use_verbose = false;
-
   old_argv = argv;
   expandargv (&argc, &argv);
   if (argv != old_argv)
@@ -1210,14 +1208,10 @@  main (int argc, char **argv)
 	  no_partition = true;
         else if ((! strncmp (argv[i], "-flto=", 6)
 		  || ! strcmp (argv[i], "-flto")) && ! use_plugin)
-	  {
-	    use_verbose = true;
-	    lto_mode = LTO_MODE_WHOPR;
-	  }
+	  lto_mode = LTO_MODE_WHOPR;
         else if (! strcmp (argv[i], "-plugin"))
 	  {
 	    use_plugin = true;
-	    use_verbose = true;
 	    lto_mode = LTO_MODE_NONE;
 	  }
 #ifdef COLLECT_EXPORT_LIST
@@ -1432,11 +1426,6 @@  main (int argc, char **argv)
 	      *c_ptr++ = xstrdup (q);
 	    }
 	}
-      if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
-	{
-	  /* Turn on trace in collect2 if needed.  */
-	  vflag = true;
-	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
   *c_ptr++ = "-fno-profile-arcs";