* [Ada] gnatmake -s -gnatn1 always recompiles
@ 2012-07-17 10:15 Arnaud Charlet
0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2012-07-17 10:15 UTC (permalink / raw)
To: gcc-patches; +Cc: Vincent Celier
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
This patch ensures that when -gnatn1 is used gnatmake -s will not
always recompile.
Tested on x86_64-pc-linux-gnu, committed on trunk
2012-07-17 Vincent Celier <celier@adacore.com>
* switch-m.adb (Normalize_Compiler_Switches): Recognize new
switches -gnatn1 and -gnatn2.
[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 2149 bytes --]
Index: switch-m.adb
===================================================================
--- switch-m.adb (revision 189565)
+++ switch-m.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -236,7 +236,7 @@
-- One-letter switches
when 'a' | 'A' | 'b' | 'B' | 'c' | 'C' | 'E' | 'f' |
- 'F' | 'g' | 'h' | 'H' | 'I' | 'L' | 'n' | 'N' |
+ 'F' | 'g' | 'h' | 'H' | 'I' | 'L' | 'N' |
'o' | 'p' | 'P' | 'q' | 'Q' | 'r' | 's' | 'S' |
't' | 'u' | 'U' | 'v' | 'x' | 'X' | 'Z' =>
Storing (First_Stored) := C;
@@ -423,6 +423,24 @@
return;
end if;
+ -- -gnatn may be -gnatn, -gnatn1 or -gnat2
+
+ when 'n' =>
+ Last_Stored := First_Stored;
+ Storing (Last_Stored) := 'n';
+ Ptr := Ptr + 1;
+
+ if Ptr <= Max
+ and then Switch_Chars (Ptr) in '1' .. '2'
+ then
+ Last_Stored := Last_Stored + 1;
+ Storing (Last_Stored) := Switch_Chars (Ptr);
+ Ptr := Ptr + 1;
+ end if;
+
+ Add_Switch_Component
+ (Storing (Storing'First .. Last_Stored));
+
-- -gnatR may be followed by '0', '1', '2' or '3',
-- then by 's'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-17 10:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 10:15 [Ada] gnatmake -s -gnatn1 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).