* [Ada] gnatmake -s -gnatC always recompiles
@ 2010-06-23 9:32 Arnaud Charlet
0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2010-06-23 9:32 UTC (permalink / raw)
To: gcc-patches; +Cc: Vincent Celier
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
When compiler switch -gnatC is used, invoking gnatmake with switch -s
was always recompiling. This patch ensures that switch -gnatC does not
trigger recompilation, same for -gnateS switch.
Tested on x86_64-pc-linux-gnu, committed on trunk
2010-06-23 Vincent Celier <celier@adacore.com>
* switch-m.adb (Normalize_Compiler_Switches): Take into account -gnatC
and -gnateS.
[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 2778 bytes --]
Index: switch-m.adb
===================================================================
--- switch-m.adb (revision 161213)
+++ switch-m.adb (working copy)
@@ -71,7 +71,7 @@ package body Switch.M is
procedure Add_Switch_Component (S : String);
-- Add a new String_Access component in Switches. If a string equal
-- to S is already stored in the table Normalized_Switches, use it.
- -- Other wise add a new component to the table.
+ -- Otherwise add a new component to the table.
--------------------------
-- Add_Switch_Component --
@@ -215,10 +215,10 @@ package body Switch.M is
-- One-letter switches
- 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' =>
+ when 'a' | 'A' | 'b' | 'c' | '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));
@@ -268,8 +268,9 @@ package body Switch.M is
when 'e' =>
- -- Store -gnateD, -gnatep= and -gnateG in the ALI file.
- -- The other -gnate switches do not need to be stored.
+ -- Store -gnateD, -gnatep=, -gnateG and -gnateS in the
+ -- ALI file. The other -gnate switches do not need to be
+ -- stored.
Storing (First_Stored) := 'e';
Ptr := Ptr + 1;
@@ -277,7 +278,8 @@ package body Switch.M is
if Ptr > Max
or else (Switch_Chars (Ptr) /= 'D'
and then Switch_Chars (Ptr) /= 'G'
- and then Switch_Chars (Ptr) /= 'p')
+ and then Switch_Chars (Ptr) /= 'p'
+ and then Switch_Chars (Ptr) /= 'S')
then
Last := 0;
return;
@@ -322,6 +324,9 @@ package body Switch.M is
elsif Switch_Chars (Ptr) = 'G' then
Add_Switch_Component ("-gnateG");
+
+ elsif Switch_Chars (Ptr) = 'S' then
+ Add_Switch_Component ("-gnateS");
end if;
return;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-23 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-23 9:32 [Ada] gnatmake -s -gnatC always recompiles Arnaud Charlet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).