From patchwork Mon May 30 09:58:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 97899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 25CE4B6F64 for ; Mon, 30 May 2011 20:02:11 +1000 (EST) Received: (qmail 20491 invoked by alias); 30 May 2011 10:02:08 -0000 Received: (qmail 20479 invoked by uid 22791); 30 May 2011 10:02:07 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 May 2011 10:01:48 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4UA1mtp032452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 30 May 2011 06:01:48 -0400 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4UA1cpN002321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 May 2011 06:01:48 -0400 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p4UA1Z1x007453 for ; Mon, 30 May 2011 07:01:35 -0300 Received: from livre.localdomain (aoliva@localhost.localdomain [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4U9wTPw027834; Mon, 30 May 2011 06:58:29 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p4U9wPe8027832; Mon, 30 May 2011 06:58:25 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: unbreak -fno-compare-debug Date: Mon, 30 May 2011 06:58:25 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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? for gcc/ChangeLog from Alexandre Oliva * 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;