Patchwork unbreak -fno-compare-debug

login
register
mail settings
Submitter Alexandre Oliva
Date May 30, 2011, 9:58 a.m.
Message ID <orfwnw33y6.fsf@livre.localdomain>
Download mbox | patch
Permalink /patch/97899/
State New
Headers show

Comments

Alexandre Oliva - May 30, 2011, 9:58 a.m.
During some command-line option handling revamp, -fno-compare-debug (AKA
-fcompare-debug=) was broken, in that it didn't disable the
recompilation any more.  This made bootstrap-debug-lean unnecessarily
slow and redundant, for stage2 was compiled twice using the -O0 stage1.
This patch restores the expected/documented behavior.  Regstrapped on
x86_64-linux-gnu and i686-linux-gnu.  Ok to install?
Jakub Jelinek - May 30, 2011, 10:07 a.m.
On Mon, May 30, 2011 at 06:58:25AM -0300, Alexandre Oliva wrote:
> This patch restores the expected/documented behavior.  Regstrapped on
> x86_64-linux-gnu and i686-linux-gnu.  Ok to install?

I'd say this is obvious.

> for  gcc/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>
> 
> 	* gcc.c (driver_handle_option): Fix disabling of -fcompare-debug.
> 
> Index: gcc/gcc.c
> ===================================================================
> --- gcc/gcc.c.orig	2011-05-18 03:29:08.183329229 -0300
> +++ gcc/gcc.c	2011-05-18 03:29:33.342256228 -0300
> @@ -3277,7 +3277,7 @@ driver_handle_option (struct gcc_options
>      compare_debug_with_arg:
>        gcc_assert (decoded->canonical_option_num_elements == 1);
>        gcc_assert (arg != NULL);
> -      if (arg)
> +      if (*arg)
>  	compare_debug = 1;
>        else
>  	compare_debug = -1;

	Jakub

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* gcc.c (driver_handle_option): Fix disabling of -fcompare-debug.

Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c.orig	2011-05-18 03:29:08.183329229 -0300
+++ gcc/gcc.c	2011-05-18 03:29:33.342256228 -0300
@@ -3277,7 +3277,7 @@  driver_handle_option (struct gcc_options
     compare_debug_with_arg:
       gcc_assert (decoded->canonical_option_num_elements == 1);
       gcc_assert (arg != NULL);
-      if (arg)
+      if (*arg)
 	compare_debug = 1;
       else
 	compare_debug = -1;