diff mbox

unbreak -fno-compare-debug

Message ID orfwnw33y6.fsf@livre.localdomain
State New
Headers show

Commit Message

Alexandre Oliva May 30, 2011, 9:58 a.m. UTC
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?

Comments

Jakub Jelinek May 30, 2011, 10:07 a.m. UTC | #1
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
diff mbox

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;