summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-17 12:16:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-17 12:16:04 +0000
commit1dffe15c8ef6eaa1ebf32bf8d54d1463538cfb46 (patch)
tree8d2ecb0a15535806ffe4827a2eeb82035440245b
parent67225bb60689517a4e7645a8f4473b1efbdbc219 (diff)
downloadgcc-1dffe15c8ef6eaa1ebf32bf8d54d1463538cfb46.tar.gz
2009-04-17 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Check_Anonymous_Return): Add missing checks to avoid generating code that references the Current_Master when compiling without tasks. 2009-04-17 Vincent Celier <celier@adacore.com> * prj-attr.adb: New project level attribute Target * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process attribute Target * prj.ads (Project_Configuration): New component Target git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146256 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/prj-attr.adb1
-rw-r--r--gcc/ada/prj-nmsc.adb8
-rw-r--r--gcc/ada/prj.ads6
-rw-r--r--gcc/ada/sem_ch6.adb7
5 files changed, 35 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 45c6cadece6..b1820a09d15 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,18 @@
+2009-04-17 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch6.adb (Check_Anonymous_Return): Add missing checks to
+ avoid generating code that references the Current_Master
+ when compiling without tasks.
+
+2009-04-17 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: New project level attribute Target
+
+ * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
+ attribute Target
+
+ * prj.ads (Project_Configuration): New component Target
+
2009-04-17 Thomas Quinot <quinot@adacore.com>
* exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 4aaecaa740a..81a611f7800 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -116,6 +116,7 @@ package body Prj.Attr is
"Satoolchain_description#" &
"Saobject_generated#" &
"Saobjects_linked#" &
+ "SVtarget#" &
-- Configuration - Libraries
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 9b173bccc52..e9bc518de69 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -1977,7 +1977,13 @@ package body Prj.Nmsc is
In_Tree.Variable_Elements.Table (Attribute_Id);
if not Attribute.Value.Default then
- if Attribute.Name = Name_Library_Builder then
+ if Attribute.Name = Name_Target then
+
+ -- Attribute Target: the target specified
+
+ Data.Config.Target := Attribute.Value.Value;
+
+ elsif Attribute.Name = Name_Library_Builder then
-- Attribute Library_Builder: the application to invoke
-- to build libraries.
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index db348b7a039..aa8d88f7571 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -997,6 +997,9 @@ package Prj is
-- The format of the different response files
type Project_Configuration is record
+ Target : Name_Id := No_Name;
+ -- The target of the configuration, when specified
+
Run_Path_Option : Name_List_Index := No_Name_List;
-- The option to use when linking to specify the path where to look for
-- libraries.
@@ -1106,7 +1109,8 @@ package Prj is
end record;
Default_Project_Config : constant Project_Configuration :=
- (Run_Path_Option => No_Name_List,
+ (Target => No_Name,
+ Run_Path_Option => No_Name_List,
Executable_Suffix => No_Name,
Linker => No_Path,
Map_File_Option => No_Name,
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index a9dd4af54e1..c51f8435fd4 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -47,6 +47,8 @@ with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Output; use Output;
+with Restrict; use Restrict;
+with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
@@ -1485,6 +1487,11 @@ package body Sem_Ch6 is
and then
Is_Limited_Record (Designated_Type (Etype (Scop)))))
and then Expander_Active
+
+ -- Avoid cases with no tasking support
+
+ and then RTE_Available (RE_Current_Master)
+ and then not Restriction_Active (No_Task_Hierarchy)
then
Decl :=
Make_Object_Declaration (Loc,