From patchwork Wed Jan 2 09:31:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] gnatmake -s -fstack-check Date: Tue, 01 Jan 2013 23:31:49 -0000 From: Arnaud Charlet X-Patchwork-Id: 208976 Message-Id: <20130102093149.GA28318@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Vincent Celier 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.