From patchwork Wed Jan 2 09:31:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 208976 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 A7CFF2C0086 for ; Wed, 2 Jan 2013 20:32:05 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1357723926; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=IYhAUP8dWvTAZ3lbP9SV 2k+sM4o=; b=hz81JDq3tR3a4sfX9+gO0SNULOzriL0/J2nu9xECMWRQYOh5IEge keWbfbWF2bpiXSSYhxoS2tNMF3oIMQLVTx30Usj7iwIOrlZTl6yBNQz6HavFojjk z3r49AfK1Mqb/ffzQwhLdDAAA4du4Ccd5AN7kYIK0wOPbmApESthPik= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=a8sxWe3qnmVx+ek8p/ds8ki6PFCRPZxc0FObYIMFwiKjMfi4R3HHbjPlpr26tj S4Xa7djGsmnUhP9EJtozkzn0BogYSIiehV9zfwxEfgYPpPkE7bg1MJOGFAER30SI yUv8Pjqx6fpJdde8ukTC+o56nWZs2TQ0+k7iYNQwDJxY8=; Received: (qmail 18485 invoked by alias); 2 Jan 2013 09:31:56 -0000 Received: (qmail 18473 invoked by uid 22791); 2 Jan 2013 09:31:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, KHOP_SPAMHAUS_DROP, RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Jan 2013 09:31:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5A9482E464; Wed, 2 Jan 2013 04:31:49 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZkbizvNsQEhM; Wed, 2 Jan 2013 04:31:49 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 3BC862E21D; Wed, 2 Jan 2013 04:31:49 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4192) id 3B0043FF09; Wed, 2 Jan 2013 04:31:49 -0500 (EST) Date: Wed, 2 Jan 2013 04:31:49 -0500 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Subject: [Ada] gnatmake -s -fstack-check Message-ID: <20130102093149.GA28318@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 As -fstack-check is an alias for -fstack-check=specific and the longer switch is now recorded in the ALI file, this patch make sure that when -fstack-check is used, gnatmake -s will no longer recompiles all the sources. The test for this is to invoke several time gnatmake -s -fstack-check on the same sources without modification of the sources. There should be no compilation starting with the second invocation. Tested on x86_64-pc-linux-gnu, committed on trunk 2013-01-02 Vincent Celier * switch-m.adb (Normalize_Compiler_Switches): Record the complete switch -fstack-check=specific instead of its shorter alias -fstack-check. Index: switch-m.adb =================================================================== --- switch-m.adb (revision 194776) +++ switch-m.adb (working copy) @@ -214,6 +214,12 @@ then Add_Switch_Component (Switch_Chars); + -- Special case for -fstack-check (alias for + -- -fstack-check=specific) + + elsif Switch_Chars = "-fstack-check" then + Add_Switch_Component ("-fstack-check=specific"); + -- Take only into account switches that are transmitted to -- gnat1 by the gcc driver and stored by gnat1 in the ALI file.