diff options
author | Bob Duff <duff@adacore.com> | 2014-07-30 13:50:25 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-30 15:50:25 +0200 |
commit | fccaf220f3c01660f800b6ea055463823051904c (patch) | |
tree | daa3a77afe6501626afff4912a34ea91ed0172a9 /gcc/ada/frontend.adb | |
parent | 3aac5551307840a5063d13759922cf334db2caeb (diff) | |
download | gcc-fccaf220f3c01660f800b6ea055463823051904c.zip gcc-fccaf220f3c01660f800b6ea055463823051904c.tar.gz gcc-fccaf220f3c01660f800b6ea055463823051904c.tar.bz2 |
s-taasde.adb (Timer_Queue): Don't use a build-in-place function call to initialize the Timer_Queue.
2014-07-30 Bob Duff <duff@adacore.com>
* s-taasde.adb (Timer_Queue): Don't use a
build-in-place function call to initialize the Timer_Queue.
* s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
Turn off polling in these units, because otherwise we get
elaboration circularities with Ada.Exceptions when the -gnatP
switch is used.
* s-tassta.adb (Create_Task): Make sure independent tasks
are created with Parent = Environment_Task. This was not true,
for example, in s-interr.adb, when Interrupt_Manager does "new
Server_Task"; the Server_Task had Parent = Interrupt_Manager,
which is wrong because the master is determined by the access
type, which is at library level.
* s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
now set correctly by Create_Task.
(Make_Passive): Remove the workaround for the race condition in
Make_Independent.
* frontend.adb (Frontend): Revert to previous method of detecting
temporary configuration pragma files, recognizing such files by
".tmp" in the name. This is more general than detecting pragmas
Source_File_Name_Project, because it allows any tool to use
this naming convention, no matter the content of the file.
* gnat_ugn.texi: Document this naming convention.
From-SVN: r213269
Diffstat (limited to 'gcc/ada/frontend.adb')
-rw-r--r-- | gcc/ada/frontend.adb | 77 |
1 files changed, 20 insertions, 57 deletions
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb index dd58c86..688f8cc 100644 --- a/gcc/ada/frontend.adb +++ b/gcc/ada/frontend.adb @@ -71,42 +71,6 @@ procedure Frontend is Config_Pragmas : List_Id; -- Gather configuration pragmas - function Need_To_Be_In_The_Dependencies - (Pragma_List : List_Id) return Boolean; - -- Check if a configuration pragmas file that contains the Pragma_List - -- should be a dependency for the source being compiled. Returns - -- False if Pragma_List is Error_List or contains only pragmas - -- Source_File_Name_Project, returns True otherwise. - - ------------------------------------ - -- Need_To_Be_In_The_Dependencies -- - ------------------------------------ - - function Need_To_Be_In_The_Dependencies - (Pragma_List : List_Id) return Boolean - is - Prag : Node_Id; - Pname : Name_Id; - - begin - if Pragma_List /= Error_List then - Prag := First (Pragma_List); - while Present (Prag) loop - Pname := Pragma_Name (Prag); - - if Pname /= Name_Source_File_Name_Project then - return True; - end if; - - Next (Prag); - end loop; - end if; - - return False; - end Need_To_Be_In_The_Dependencies; - --- Start of processing for Frontend - begin -- Carry out package initializations. These are initializations which might -- logically be performed at elaboration time, were it not for the fact @@ -180,6 +144,8 @@ begin Prag : Node_Id; + Temp_File : Boolean; + begin -- We always analyze config files with style checks off, since -- we don't want a miscellaneous gnat.adc that is around to @@ -253,6 +219,13 @@ begin Name_Len := Config_File_Names (Index)'Length; Name_Buffer (1 .. Name_Len) := Config_File_Names (Index).all; + Temp_File := + Name_Len > 4 + and then + (Name_Buffer (Name_Len - 3 .. Name_Len) = ".TMP" + or else + Name_Buffer (Name_Len - 3 .. Name_Len) = ".tmp"); + -- Load the file, error if we did not find it Source_Config_File := Load_Config_File (Name_Enter); @@ -262,30 +235,20 @@ begin ("cannot find configuration pragmas file " & Config_File_Names (Index).all); - -- If we did find the file, and it contains pragmas other than - -- Source_File_Name_Project, then we unconditionally add a - -- compilation dependency for it so that if it changes, we force - -- a recompilation. This is a fairly recent (2014-03-28) change. - - else - - -- Parse the config pragmas file, and accumulate results - - Initialize_Scanner (No_Unit, Source_Config_File); - - declare - Pragma_List : constant List_Id := - Par (Configuration_Pragmas => True); - - begin - if Need_To_Be_In_The_Dependencies (Pragma_List) then - Prepcomp.Add_Dependency (Source_Config_File); - end if; + -- If we did find the file, and it is not a temporary file, then + -- we unconditionally add a compilation dependency for it so + -- that if it changes, we force a recompilation. This is a + -- fairly recent (2014-03-28) change. - Append_List_To (Config_Pragmas, Pragma_List); - end; + elsif not Temp_File then + Prepcomp.Add_Dependency (Source_Config_File); end if; + -- Parse the config pragmas file, and accumulate results + + Initialize_Scanner (No_Unit, Source_Config_File); + Append_List_To + (Config_Pragmas, Par (Configuration_Pragmas => True)); end loop; end if; |