From patchwork Tue Jun 22 17:18:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] gnatmake does not take into account compiler switch -gnatknn From: Arnaud Charlet X-Patchwork-Id: 56539 Message-Id: <20100622171810.GA30827@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Date: Tue, 22 Jun 2010 19:18:10 +0200 When the gnatmake switch -s is used, all Ada sources are recompiled even if they are up to date, when the compiler is invoked with -gnatknn. This patch fixes this. The test for this is to invoke twice in a row gnatmake -s main.adb -cargs -gnatk99 There should be no recompilation for the second invocation. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-06-22 Vincent Celier * switch-m.adb (Normalize_Compiler_Switches): Process correctly switches -gnatknn. Index: switch-m.adb =================================================================== --- switch-m.adb (revision 161186) +++ switch-m.adb (working copy) @@ -215,10 +215,10 @@ package body Switch.M is -- One-letter switches - when 'a' | 'A' | 'b' | 'c' | 'D' | 'E' | 'f' | - 'F' | 'g' | 'h' | 'H' | 'k' | 'l' | 'L' | 'n' | 'N' | - 'o' | 'O' | 'p' | 'P' | 'q' | 'Q' | 'r' | 's' | 't' | - 'u' | 'U' | 'v' | 'x' | 'X' | 'Z' => + when 'a' | 'A' | 'b' | 'c' | 'D' | 'E' | 'f' | 'F' | + 'g' | 'h' | 'H' | 'l' | 'L' | 'n' | 'N' | 'o' | + 'O' | 'p' | 'P' | 'q' | 'Q' | 'r' | 's' | 't' | + 'u' | 'U' | 'v' | 'x' | 'X' | 'Z' => Storing (First_Stored) := C; Add_Switch_Component (Storing (Storing'First .. First_Stored)); @@ -226,7 +226,7 @@ package body Switch.M is -- One-letter switches followed by a positive number - when 'm' | 'T' => + when 'k' | 'm' | 'T' => Storing (First_Stored) := C; Last_Stored := First_Stored;