summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 09:02:58 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 09:02:58 +0000
commit6dbe70cebfaf97a135aeec67cf8ffc324ba26f37 (patch)
treea411d7cece4ed3786ee9ddf7b071b83244895f26 /gcc/ada
parent7d86aa98343399b59afd325c6224b76b63d52c1c (diff)
downloadgcc-6dbe70cebfaf97a135aeec67cf8ffc324ba26f37.tar.gz
2008-08-01 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New attribute Compiler'Name_Syntax (<lang>) * prj-nmsc.adb (Process_Compiler): Recognize attribute Name_Syntax * prj.adb (Object_Exist_For): Use Object_Generated, not Objects_Generated that is removed and was never modified anyway. * prj.ads: (Path_Syntax_Kind): New enumeration type (Language_Config): New component Path_Syntax, defaulted to Host. Components PIC_Option and Objects_Generated removed, as they are not used. * snames.adb: New standard name Path_Syntax * snames.ads: New standard name Path_Syntax git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/prj-attr.adb1
-rw-r--r--gcc/ada/prj-nmsc.adb16
-rw-r--r--gcc/ada/prj.adb2
-rw-r--r--gcc/ada/prj.ads19
-rw-r--r--gcc/ada/snames.adb1
-rw-r--r--gcc/ada/snames.ads71
6 files changed, 65 insertions, 45 deletions
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 6f6c888b4e6..3421ac1cd70 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -168,6 +168,7 @@ package body Prj.Attr is
"Sadriver#" &
"Larequired_switches#" &
"Lapic_option#" &
+ "Sapath_syntax#" &
-- Configuration - Mapping files
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 3aa90ddfbd1..1742caf08ab 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -1509,6 +1509,22 @@ package body Prj.Nmsc is
From_List => Element.Value.Values,
In_Tree => In_Tree);
+ when Name_Path_Syntax =>
+ begin
+ In_Tree.Languages_Data.Table
+ (Lang_Index).Config.Path_Syntax :=
+ Path_Syntax_Kind'Value
+ (Get_Name_String (Element.Value.Value));
+
+ exception
+ when Constraint_Error =>
+ Error_Msg
+ (Project,
+ In_Tree,
+ "invalid value for Path_Syntax",
+ Element.Value.Location);
+ end;
+
when Name_Pic_Option =>
-- Attribute Compiler_Pic_Option (<language>)
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 23623f5feda..505e2dad3d1 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -690,7 +690,7 @@ package body Prj is
if In_Tree.Languages_Data.Table (Lang).Name = Language_Id then
return
In_Tree.Languages_Data.Table
- (Lang).Config.Objects_Generated;
+ (Lang).Config.Object_Generated;
end if;
Lang := In_Tree.Languages_Data.Table (Lang).Next;
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 9af43b388ce..29da0e7d322 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -399,6 +399,10 @@ package Prj is
No_Source : constant Source_Id := 0;
+ type Path_Syntax_Kind is (Canonical, Host);
+ -- Canonical = Unix style
+ -- Host = host specific syntax, for example on VMS (the default)
+
type Language_Config is record
Kind : Language_Kind := File_Based;
-- Kind of language. All languages are file based, except Ada which is
@@ -423,6 +427,10 @@ package Prj is
-- The list of switches that are required as a minimum to invoke the
-- compiler driver.
+ Path_Syntax : Path_Syntax_Kind := Host;
+ -- Value may be Canonical (Unix style) or Host (host syntax, for example
+ -- on VMS for DEC C).
+
Compilation_PIC_Option : Name_List_Index := No_Name_List;
-- The option(s) to compile a source in Position Independent Code for
-- shared libraries. Specified in the configuration. When not specified,
@@ -525,12 +533,6 @@ package Prj is
Toolchain_Description : Name_Id := No_Name;
-- Hold the value of attribute Toolchain_Description for the language
- PIC_Option : Name_Id := No_Name;
- -- Hold the value of attribute Compiler'PIC_Option for the language
-
- Objects_Generated : Boolean := True;
- -- Indicates if objects are generated for the language
-
end record;
-- Record describing the configuration of a language
@@ -541,6 +543,7 @@ package Prj is
Compiler_Driver => No_File,
Compiler_Driver_Path => null,
Compiler_Required_Switches => No_Name_List,
+ Path_Syntax => Canonical,
Compilation_PIC_Option => No_Name_List,
Object_Generated => True,
Objects_Linked => True,
@@ -567,9 +570,7 @@ package Prj is
Binder_Required_Switches => No_Name_List,
Binder_Prefix => No_Name,
Toolchain_Version => No_Name,
- Toolchain_Description => No_Name,
- PIC_Option => No_Name,
- Objects_Generated => True);
+ Toolchain_Description => No_Name);
type Language_Data is record
Name : Name_Id := No_Name;
diff --git a/gcc/ada/snames.adb b/gcc/ada/snames.adb
index d23edf9ad6b..ea14cf116df 100644
--- a/gcc/ada/snames.adb
+++ b/gcc/ada/snames.adb
@@ -780,6 +780,7 @@ package body Snames is
"objects_path#" &
"objects_path_file#" &
"object_dir#" &
+ "path_syntax#" &
"pic_option#" &
"pretty_printer#" &
"prefix#" &
diff --git a/gcc/ada/snames.ads b/gcc/ada/snames.ads
index 5a47de55c89..da6c9a5a800 100644
--- a/gcc/ada/snames.ads
+++ b/gcc/ada/snames.ads
@@ -1107,53 +1107,54 @@ package Snames is
Name_Objects_Path : constant Name_Id := N + 719;
Name_Objects_Path_File : constant Name_Id := N + 720;
Name_Object_Dir : constant Name_Id := N + 721;
- Name_Pic_Option : constant Name_Id := N + 722;
- Name_Pretty_Printer : constant Name_Id := N + 723;
- Name_Prefix : constant Name_Id := N + 724;
- Name_Project : constant Name_Id := N + 725;
- Name_Roots : constant Name_Id := N + 726;
- Name_Required_Switches : constant Name_Id := N + 727;
- Name_Run_Path_Option : constant Name_Id := N + 728;
- Name_Runtime_Project : constant Name_Id := N + 729;
- Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 730;
- Name_Shared_Library_Prefix : constant Name_Id := N + 731;
- Name_Shared_Library_Suffix : constant Name_Id := N + 732;
- Name_Separate_Suffix : constant Name_Id := N + 733;
- Name_Source_Dirs : constant Name_Id := N + 734;
- Name_Source_Files : constant Name_Id := N + 735;
- Name_Source_List_File : constant Name_Id := N + 736;
- Name_Spec : constant Name_Id := N + 737;
- Name_Spec_Suffix : constant Name_Id := N + 738;
- Name_Specification : constant Name_Id := N + 739;
- Name_Specification_Exceptions : constant Name_Id := N + 740;
- Name_Specification_Suffix : constant Name_Id := N + 741;
- Name_Stack : constant Name_Id := N + 742;
- Name_Switches : constant Name_Id := N + 743;
- Name_Symbolic_Link_Supported : constant Name_Id := N + 744;
- Name_Sync : constant Name_Id := N + 745;
- Name_Synchronize : constant Name_Id := N + 746;
- Name_Toolchain_Description : constant Name_Id := N + 747;
- Name_Toolchain_Version : constant Name_Id := N + 748;
- Name_Runtime_Library_Dir : constant Name_Id := N + 749;
+ Name_Path_Syntax : constant Name_Id := N + 722;
+ Name_Pic_Option : constant Name_Id := N + 723;
+ Name_Pretty_Printer : constant Name_Id := N + 724;
+ Name_Prefix : constant Name_Id := N + 725;
+ Name_Project : constant Name_Id := N + 726;
+ Name_Roots : constant Name_Id := N + 727;
+ Name_Required_Switches : constant Name_Id := N + 728;
+ Name_Run_Path_Option : constant Name_Id := N + 729;
+ Name_Runtime_Project : constant Name_Id := N + 730;
+ Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 731;
+ Name_Shared_Library_Prefix : constant Name_Id := N + 732;
+ Name_Shared_Library_Suffix : constant Name_Id := N + 733;
+ Name_Separate_Suffix : constant Name_Id := N + 734;
+ Name_Source_Dirs : constant Name_Id := N + 735;
+ Name_Source_Files : constant Name_Id := N + 736;
+ Name_Source_List_File : constant Name_Id := N + 737;
+ Name_Spec : constant Name_Id := N + 738;
+ Name_Spec_Suffix : constant Name_Id := N + 739;
+ Name_Specification : constant Name_Id := N + 740;
+ Name_Specification_Exceptions : constant Name_Id := N + 741;
+ Name_Specification_Suffix : constant Name_Id := N + 742;
+ Name_Stack : constant Name_Id := N + 743;
+ Name_Switches : constant Name_Id := N + 744;
+ Name_Symbolic_Link_Supported : constant Name_Id := N + 745;
+ Name_Sync : constant Name_Id := N + 746;
+ Name_Synchronize : constant Name_Id := N + 747;
+ Name_Toolchain_Description : constant Name_Id := N + 748;
+ Name_Toolchain_Version : constant Name_Id := N + 749;
+ Name_Runtime_Library_Dir : constant Name_Id := N + 750;
-- Other miscellaneous names used in front end
- Name_Unaligned_Valid : constant Name_Id := N + 750;
+ Name_Unaligned_Valid : constant Name_Id := N + 751;
-- Ada 2005 reserved words
- First_2005_Reserved_Word : constant Name_Id := N + 751;
- Name_Interface : constant Name_Id := N + 751;
- Name_Overriding : constant Name_Id := N + 752;
- Name_Synchronized : constant Name_Id := N + 753;
- Last_2005_Reserved_Word : constant Name_Id := N + 753;
+ First_2005_Reserved_Word : constant Name_Id := N + 752;
+ Name_Interface : constant Name_Id := N + 752;
+ Name_Overriding : constant Name_Id := N + 753;
+ Name_Synchronized : constant Name_Id := N + 754;
+ Last_2005_Reserved_Word : constant Name_Id := N + 754;
subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body
- Last_Predefined_Name : constant Name_Id := N + 753;
+ Last_Predefined_Name : constant Name_Id := N + 754;
---------------------------------------
-- Subtypes Defining Name Categories --