diff mbox

[Ada] Add support for fully standalone libraries

Message ID 20111221115016.GA10729@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Dec. 21, 2011, 11:50 a.m. UTC
The new Library_Standalone attribute is used to select the mode
for the standalone shared libraries.

   No       : This is not a standalone library. Library_Interface should
              not be set.

   Standard : elaboration/finalization local for the library.

   Full     : as above, but link only against static libraries.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-12-21  Pascal Obry  <obry@adacore.com>

	* prj-attr.adb, snames.ads-tmpl: Add Library_Standalone,
	Library_Fully_Standalone_Options and
	Library_Fully_Standalone_Supported attributes.
	* prj-nmsc.adb (Check_Library): Update check to take into
	account fully standalone libraries. Such shared libraries can
	only depend on static libraries.
	(Check_Stand_Alone_Library): Add support for fully standalone libraries.
	(Process_Project_Level_Simple_Attributes): Store value for
	configuration attribute Library_Fully_Standalone_Supported.
	* prj.ads, makeutl.adb (Standalone): New enumeration type.
	(Project_Data): Standalone_Library now of type Standlone.
	(Project_Configuration): Add Lib_Fully_Standalone_Supported
	field.
	(Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported
	field.
	* clean.adb (Clean_Project): Adjust to new type for Standalone.
	* make.adb (Library_Phase): Adjust to new type for Standalone.
	(Gnatmake): Likewise.
	* mlib-prj.adb (Build_Library): Adjust to new type for
	Standalone.
diff mbox

Patch

Index: make.adb
===================================================================
--- make.adb	(revision 182572)
+++ make.adb	(working copy)
@@ -4647,7 +4647,7 @@ 
       Proj1 := Project_Tree.Projects;
       while Proj1 /= null loop
          if Proj1.Project.Extended_By = No_Project then
-            if Proj1.Project.Standalone_Library then
+            if Proj1.Project.Standalone_Library /= No then
                Stand_Alone_Libraries := True;
             end if;
 
@@ -5791,7 +5791,7 @@ 
       if Osint.Number_Of_Files = 0 then
          if Main_Project /= No_Project and then Main_Project.Library then
             if Do_Bind_Step
-              and then not Main_Project.Standalone_Library
+              and then Main_Project.Standalone_Library = No
             then
                Make_Failed ("only stand-alone libraries may be bound");
             end if;
Index: mlib-prj.adb
===================================================================
--- mlib-prj.adb	(revision 182572)
+++ mlib-prj.adb	(working copy)
@@ -317,7 +317,7 @@ 
                                 Get_Name_String
                                   (For_Project.Object_Directory.Display_Name);
 
-      Standalone   : constant Boolean := For_Project.Standalone_Library;
+      Standalone   : constant Boolean := For_Project.Standalone_Library /= No;
 
       Project_Name : constant String := Get_Name_String (For_Project.Name);
 
Index: gnat_ugn.texi
===================================================================
--- gnat_ugn.texi	(revision 182572)
+++ gnat_ugn.texi	(working copy)
@@ -16359,6 +16359,28 @@ 
 imported from Ada units outside of the library. If other units are imported,
 the binding phase will fail.
 
+@noindent
+It is also possible to build a fully standalone library where not only
+the code to elaborate and finalize the library is embedded but also
+ensuring that the library is linked only against static
+libraries. So a fully standalone library only depends on system
+libraries, all other code, including the GNAT runtime, is embedded. To
+build a fully standalone library the attribute
+@code{Library_Standalone} must be set to @code{full}:
+
+@smallexample @c projectfile
+@group
+   for Library_Dir use "lib_dir";
+   for Library_Name use "dummy";
+   for Library_Interface use ("int1", "int1.child");
+   for Library_Standalone use "full";
+@end group
+@end smallexample
+
+@noindent
+The default value for this attribute is @code{standard} in which case
+a not fully standalone library is built.
+
 The attribute @code{Library_Src_Dir} may be specified for a
 Stand-Alone Library. @code{Library_Src_Dir} is a simple attribute that has a
 single string value. Its value must be the path (absolute or relative to the
Index: prj.ads
===================================================================
--- prj.ads	(revision 182572)
+++ prj.ads	(working copy)
@@ -1025,6 +1025,9 @@ 
       --  The level of library support. Specified in the configuration. Support
       --  is none, static libraries only or both static and shared libraries.
 
+      Lib_Fully_Standalone_Supported : Boolean := False;
+      --  True when building fully standalone libraries supported on the target
+
       Archive_Builder : Name_List_Index := No_Name_List;
       --  The name of the executable to build archives, with the minimum
       --  switches. Specified in the configuration.
@@ -1077,37 +1080,38 @@ 
    end record;
 
    Default_Project_Config : constant Project_Configuration :=
-                              (Target                        => No_Name,
-                               Run_Path_Option               => No_Name_List,
-                               Run_Path_Origin               => No_Name,
-                               Library_Install_Name_Option   => No_Name,
-                               Separate_Run_Path_Options     => False,
-                               Executable_Suffix             => No_Name,
-                               Linker                        => No_Path,
-                               Map_File_Option               => No_Name,
+                              (Target                         => No_Name,
+                               Run_Path_Option                => No_Name_List,
+                               Run_Path_Origin                => No_Name,
+                               Library_Install_Name_Option    => No_Name,
+                               Separate_Run_Path_Options      => False,
+                               Executable_Suffix              => No_Name,
+                               Linker                         => No_Path,
+                               Map_File_Option                => No_Name,
                                Trailing_Linker_Required_Switches =>
                                  No_Name_List,
-                               Linker_Executable_Option      => No_Name_List,
-                               Linker_Lib_Dir_Option         => No_Name,
-                               Linker_Lib_Name_Option        => No_Name,
-                               Library_Builder               => No_Path,
-                               Max_Command_Line_Length       => 0,
-                               Resp_File_Format              => None,
-                               Resp_File_Options             => No_Name_List,
-                               Lib_Support                   => None,
-                               Archive_Builder               => No_Name_List,
-                               Archive_Builder_Append_Option => No_Name_List,
-                               Archive_Indexer               => No_Name_List,
-                               Archive_Suffix                => No_File,
-                               Lib_Partial_Linker            => No_Name_List,
-                               Shared_Lib_Driver             => No_File,
-                               Shared_Lib_Prefix             => No_File,
-                               Shared_Lib_Suffix             => No_File,
-                               Shared_Lib_Min_Options        => No_Name_List,
-                               Lib_Version_Options           => No_Name_List,
-                               Symbolic_Link_Supported       => False,
-                               Lib_Maj_Min_Id_Supported      => False,
-                               Auto_Init_Supported           => False);
+                               Linker_Executable_Option       => No_Name_List,
+                               Linker_Lib_Dir_Option          => No_Name,
+                               Linker_Lib_Name_Option         => No_Name,
+                               Library_Builder                => No_Path,
+                               Max_Command_Line_Length        => 0,
+                               Resp_File_Format               => None,
+                               Resp_File_Options              => No_Name_List,
+                               Lib_Support                    => None,
+                               Lib_Fully_Standalone_Supported => False,
+                               Archive_Builder                => No_Name_List,
+                               Archive_Builder_Append_Option  => No_Name_List,
+                               Archive_Indexer                => No_Name_List,
+                               Archive_Suffix                 => No_File,
+                               Lib_Partial_Linker             => No_Name_List,
+                               Shared_Lib_Driver              => No_File,
+                               Shared_Lib_Prefix              => No_File,
+                               Shared_Lib_Suffix              => No_File,
+                               Shared_Lib_Min_Options         => No_Name_List,
+                               Lib_Version_Options            => No_Name_List,
+                               Symbolic_Link_Supported        => False,
+                               Lib_Maj_Min_Id_Supported       => False,
+                               Auto_Init_Supported            => False);
 
    -------------------------
    -- Aggregated projects --
@@ -1139,6 +1143,8 @@ 
 
    --  The following record describes a project file representation
 
+   type Standalone is (No, Standard, Full);
+
    type Project_Data (Qualifier : Project_Qualifier := Unspecified) is record
 
       -------------
@@ -1251,7 +1257,7 @@ 
       Lib_Internal_Name : Name_Id := No_Name;
       --  If a library project, internal name store inside the library
 
-      Standalone_Library : Boolean := False;
+      Standalone_Library : Standalone := No;
       --  Indicate that this is a Standalone Library Project File
 
       Lib_Interface_ALIs : String_List_Id := Nil_String;
Index: makeutl.adb
===================================================================
--- makeutl.adb	(revision 182572)
+++ makeutl.adb	(working copy)
@@ -2896,7 +2896,7 @@ 
 
                   if Src_Id /= No_Source
                     and then (not Excluding_Shared_SALs
-                               or else not Src_Id.Project.Standalone_Library
+                               or else Src_Id.Project.Standalone_Library = No
                                or else Src_Id.Project.Library_Kind = Static)
                   then
                      Queue.Insert
Index: clean.adb
===================================================================
--- clean.adb	(revision 182572)
+++ clean.adb	(working copy)
@@ -1088,8 +1088,8 @@ 
                end if;
             end if;
 
-            if Project.Standalone_Library and then
-              Project.Object_Directory /= No_Path_Information
+            if Project.Standalone_Library /= No
+              and then Project.Object_Directory /= No_Path_Information
             then
                Delete_Binder_Generated_Files
                  (Get_Name_String (Project.Object_Directory.Display_Name),
Index: prj-nmsc.adb
===================================================================
--- prj-nmsc.adb	(revision 182572)
+++ prj-nmsc.adb	(working copy)
@@ -2155,6 +2155,24 @@ 
                            Attribute.Value.Location, Project);
                   end;
 
+               elsif
+                 Attribute.Name = Name_Library_Fully_Standalone_Supported
+               then
+                  declare
+                     pragma Unsuppress (All_Checks);
+                  begin
+                     Project.Config.Lib_Fully_Standalone_Supported :=
+                       Boolean'Value (Get_Name_String (Attribute.Value.Value));
+                  exception
+                     when Constraint_Error =>
+                        Error_Msg
+                          (Data.Flags,
+                           "invalid value """
+                             & Get_Name_String (Attribute.Value.Value)
+                             & """ for Library_Fully_Standalone_Supported",
+                           Attribute.Value.Location, Project);
+                  end;
+
                elsif Attribute.Name = Name_Shared_Library_Prefix then
                   Project.Config.Shared_Lib_Prefix :=
                     File_Name_Type (Attribute.Value.Value);
@@ -2778,36 +2796,39 @@ 
    is
       Shared : constant Shared_Project_Tree_Data_Access := Data.Tree.Shared;
 
-      Attributes   : constant Prj.Variable_Id := Project.Decl.Attributes;
+      Attributes     : constant Prj.Variable_Id := Project.Decl.Attributes;
 
-      Lib_Dir      : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_Dir, Attributes, Shared);
+      Lib_Dir        : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Dir, Attributes, Shared);
 
-      Lib_Name     : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_Name, Attributes, Shared);
+      Lib_Name       : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Name, Attributes, Shared);
 
-      Lib_Version  : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_Version, Attributes, Shared);
+      Lib_Standalone : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Standalone,
+                            Attributes, Shared);
 
-      Lib_ALI_Dir  : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_Ali_Dir, Attributes, Shared);
+      Lib_Version    : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Version, Attributes, Shared);
 
-      Lib_GCC      : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_GCC, Attributes, Shared);
+      Lib_ALI_Dir    : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Ali_Dir, Attributes, Shared);
 
-      The_Lib_Kind : constant Prj.Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Snames.Name_Library_Kind, Attributes, Shared);
+      Lib_GCC        : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_GCC, Attributes, Shared);
 
+      The_Lib_Kind   : constant Prj.Variable_Value :=
+                         Prj.Util.Value_Of
+                           (Snames.Name_Library_Kind, Attributes, Shared);
+
       Imported_Project_List : Project_List;
-
-      Continuation : String_Access := No_Continuation_String'Access;
-
+      Continuation          : String_Access := No_Continuation_String'Access;
       Support_For_Libraries : Library_Support;
 
       Library_Directory_Present : Boolean;
@@ -2869,7 +2890,29 @@ 
                end if;
 
             elsif Project.Library_Kind /= Static
+              and then not Lib_Standalone.Default
+              and then Get_Name_String (Lib_Standalone.Value) = "full"
+              and then Proj.Library_Kind /= Static
+            then
+               --  A fully standalone library must depend only on static
+               --  libraries.
+
+               Error_Msg_Name_1 := Project.Name;
+               Error_Msg_Name_2 := Proj.Name;
+
+               Error_Msg
+                 (Data.Flags,
+                  Continuation.all &
+                    "standalone library project %% cannot import shared " &
+                    "library project %%",
+                  Project.Location, Project);
+               Continuation := Continuation_String'Access;
+
+            elsif Project.Library_Kind /= Static
               and then Proj.Library_Kind = Static
+              and then (Lib_Standalone.Default
+                         or else
+                           Get_Name_String (Lib_Standalone.Value) /= "full")
             then
                Error_Msg_Name_1 := Project.Name;
                Error_Msg_Name_2 := Proj.Name;
@@ -4309,6 +4352,12 @@ 
                                  Project.Decl.Attributes,
                                  Shared);
 
+      Lib_Standalone      : constant Prj.Variable_Value :=
+                              Prj.Util.Value_Of
+                                (Snames.Name_Library_Standalone,
+                                 Project.Decl.Attributes,
+                                 Shared);
+
       Lib_Auto_Init       : constant Prj.Variable_Value :=
                               Prj.Util.Value_Of
                                 (Snames.Name_Library_Auto_Init,
@@ -4353,8 +4402,17 @@ 
       --  It is a stand-alone library project file if attribute
       --  Library_Interface is defined.
 
-      if not Lib_Interfaces.Default then
+      if Lib_Interfaces.Default then
+         if not Lib_Standalone.Default
+           and then Get_Name_String (Lib_Standalone.Value) /= "no"
+         then
+            Error_Msg
+              (Data.Flags,
+               "Library_Standalone valid only if Library_Interface is set",
+               Lib_Standalone.Location, Project);
+         end if;
 
+      else
          --  The name of a stand-alone library needs to have the syntax of an
          --  Ada identifier.
 
@@ -4400,8 +4458,35 @@ 
             Unit           : Name_Id;
 
          begin
-            Project.Standalone_Library := True;
+            if Lib_Standalone.Default then
+               Project.Standalone_Library := Standard;
 
+            else
+               Get_Name_String (Lib_Standalone.Value);
+               To_Lower (Name_Buffer (1 .. Name_Len));
+
+               if Name_Buffer (1 .. Name_Len) = "standard" then
+                  Project.Standalone_Library := Standard;
+
+               elsif Name_Buffer (1 .. Name_Len) = "full" then
+                  Project.Standalone_Library := Full;
+
+               elsif Name_Buffer (1 .. Name_Len) = "no" then
+                  Project.Standalone_Library := No;
+                  Error_Msg
+                    (Data.Flags,
+                     "wrong value for Library_Standalone "
+                     & "when Library_Interface defined",
+                     Lib_Standalone.Location, Project);
+
+               else
+                  Error_Msg
+                    (Data.Flags,
+                     "invalid value for attribute Library_Standalone",
+                     Lib_Standalone.Location, Project);
+               end if;
+            end if;
+
             --  Library_Interface cannot be an empty list
 
             if Interfaces = Nil_String then
Index: prj-attr.adb
===================================================================
--- prj-attr.adb	(revision 182572)
+++ prj-attr.adb	(working copy)
@@ -105,6 +105,9 @@ 
    "SVlibrary_kind#" &
    "SVlibrary_version#" &
    "LVlibrary_interface#" &
+   "SVlibrary_standalone#" &
+   "LVlibrary_fully_standalone_options#" &
+   "SVlibrary_fully_standalone_supported#" &
    "SVlibrary_auto_init#" &
    "LVleading_library_options#" &
    "LVlibrary_options#" &
Index: projects.texi
===================================================================
--- projects.texi	(revision 182572)
+++ projects.texi	(working copy)
@@ -1777,6 +1777,26 @@ 
 @end group
 @end smallexample
 
+@item @b{Library_Standalone}:
+@cindex @code{Library_Standalone}
+  This attribute defines the kind of standalone library to
+  build. Values are either @code{standard} (the default), @code{no} or
+  @code{full}. When @code{standard} is used the code to elaborate and
+  finalize the library is embedded, when @code{full} is used the
+  library can furthermore only depends on static libraries (including
+  the GNAT runtime). This attribute can be set to @code{no} to make it clear
+  that the library should not be standalone in which case the
+  @code{Library_Interface} should not defined.
+
+@smallexample @c projectfile
+@group
+     for Library_Dir use "lib";
+     for Library_Name use "loggin";
+     for Library_Interface use ("lib1", "lib2");  --  unit names
+     for Library_Standalone use "full";
+@end group
+@end smallexample
+
 @end table
 
 In order to include the elaboration code in the stand-alone library, the binder
Index: snames.ads-tmpl
===================================================================
--- snames.ads-tmpl	(revision 182572)
+++ snames.ads-tmpl	(working copy)
@@ -1089,148 +1089,151 @@ 
 
    --  Additional reserved words and identifiers used in GNAT Project Files
    --  Note that Name_External is already previously declared
-   --  The names with the --  GPR annotation are only used in gprbuild
+   --  The names with the -- GB annotation are only used in gprbuild
 
-   Name_Aggregate                        : constant Name_Id := N + $;
-   Name_Archive_Builder                  : constant Name_Id := N + $;
-   Name_Archive_Builder_Append_Option    : constant Name_Id := N + $;
-   Name_Archive_Indexer                  : constant Name_Id := N + $;
-   Name_Archive_Suffix                   : constant Name_Id := N + $;
-   Name_Binder                           : constant Name_Id := N + $;
-   Name_Body_Suffix                      : constant Name_Id := N + $;
-   Name_Builder                          : constant Name_Id := N + $;
-   Name_Compiler                         : constant Name_Id := N + $;
-   Name_Compiler_Command                 : constant Name_Id := N + $; --  GPR
-   Name_Config_Body_File_Name            : constant Name_Id := N + $;
-   Name_Config_Body_File_Name_Index      : constant Name_Id := N + $;
-   Name_Config_Body_File_Name_Pattern    : constant Name_Id := N + $;
-   Name_Config_File_Switches             : constant Name_Id := N + $;
-   Name_Config_File_Unique               : constant Name_Id := N + $;
-   Name_Config_Spec_File_Name            : constant Name_Id := N + $;
-   Name_Config_Spec_File_Name_Index      : constant Name_Id := N + $;
-   Name_Config_Spec_File_Name_Pattern    : constant Name_Id := N + $;
-   Name_Configuration                    : constant Name_Id := N + $;
-   Name_Cross_Reference                  : constant Name_Id := N + $;
-   Name_Default_Language                 : constant Name_Id := N + $;
-   Name_Default_Switches                 : constant Name_Id := N + $;
-   Name_Dependency_Driver                : constant Name_Id := N + $;
-   Name_Dependency_Kind                  : constant Name_Id := N + $;
-   Name_Dependency_Switches              : constant Name_Id := N + $;
-   Name_Driver                           : constant Name_Id := N + $;
-   Name_Excluded_Source_Dirs             : constant Name_Id := N + $;
-   Name_Excluded_Source_Files            : constant Name_Id := N + $;
-   Name_Excluded_Source_List_File        : constant Name_Id := N + $;
-   Name_Exec_Dir                         : constant Name_Id := N + $;
-   Name_Executable                       : constant Name_Id := N + $;
-   Name_Executable_Suffix                : constant Name_Id := N + $;
-   Name_Extends                          : constant Name_Id := N + $;
-   Name_External_As_List                 : constant Name_Id := N + $;
-   Name_Externally_Built                 : constant Name_Id := N + $;
-   Name_Finder                           : constant Name_Id := N + $;
-   Name_Global_Compilation_Switches      : constant Name_Id := N + $;
-   Name_Global_Configuration_Pragmas     : constant Name_Id := N + $;
-   Name_Global_Config_File               : constant Name_Id := N + $; --  GPR
-   Name_Gnatls                           : constant Name_Id := N + $;
-   Name_Gnatstub                         : constant Name_Id := N + $;
-   Name_Gnu                              : constant Name_Id := N + $;
-   Name_Ide                              : constant Name_Id := N + $;
-   Name_Ignore_Source_Sub_Dirs           : constant Name_Id := N + $;
-   Name_Implementation                   : constant Name_Id := N + $;
-   Name_Implementation_Exceptions        : constant Name_Id := N + $;
-   Name_Implementation_Suffix            : constant Name_Id := N + $;
-   Name_Include_Switches                 : constant Name_Id := N + $;
-   Name_Include_Path                     : constant Name_Id := N + $;
-   Name_Include_Path_File                : constant Name_Id := N + $;
-   Name_Inherit_Source_Path              : constant Name_Id := N + $;
-   Name_Languages                        : constant Name_Id := N + $;
-   Name_Language_Kind                    : constant Name_Id := N + $;
-   Name_Leading_Library_Options          : constant Name_Id := N + $;
-   Name_Leading_Required_Switches        : constant Name_Id := N + $;
-   Name_Leading_Switches                 : constant Name_Id := N + $;
-   Name_Library                          : constant Name_Id := N + $;
-   Name_Library_Ali_Dir                  : constant Name_Id := N + $;
-   Name_Library_Auto_Init                : constant Name_Id := N + $;
-   Name_Library_Auto_Init_Supported      : constant Name_Id := N + $;
-   Name_Library_Builder                  : constant Name_Id := N + $;
-   Name_Library_Dir                      : constant Name_Id := N + $;
-   Name_Library_GCC                      : constant Name_Id := N + $;
-   Name_Library_Install_Name_Option      : constant Name_Id := N + $;
-   Name_Library_Interface                : constant Name_Id := N + $;
-   Name_Library_Kind                     : constant Name_Id := N + $;
-   Name_Library_Name                     : constant Name_Id := N + $;
-   Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + $;
-   Name_Library_Options                  : constant Name_Id := N + $;
-   Name_Library_Partial_Linker           : constant Name_Id := N + $;
-   Name_Library_Reference_Symbol_File    : constant Name_Id := N + $;
-   Name_Library_Src_Dir                  : constant Name_Id := N + $;
-   Name_Library_Support                  : constant Name_Id := N + $;
-   Name_Library_Symbol_File              : constant Name_Id := N + $;
-   Name_Library_Symbol_Policy            : constant Name_Id := N + $;
-   Name_Library_Version                  : constant Name_Id := N + $;
-   Name_Library_Version_Switches         : constant Name_Id := N + $;
-   Name_Linker                           : constant Name_Id := N + $;
-   Name_Linker_Executable_Option         : constant Name_Id := N + $;
-   Name_Linker_Lib_Dir_Option            : constant Name_Id := N + $;
-   Name_Linker_Lib_Name_Option           : constant Name_Id := N + $;
-   Name_Local_Config_File                : constant Name_Id := N + $; --  GPR
-   Name_Local_Configuration_Pragmas      : constant Name_Id := N + $;
-   Name_Locally_Removed_Files            : constant Name_Id := N + $;
-   Name_Map_File_Option                  : constant Name_Id := N + $;
-   Name_Mapping_File_Switches            : constant Name_Id := N + $;
-   Name_Mapping_Spec_Suffix              : constant Name_Id := N + $;
-   Name_Mapping_Body_Suffix              : constant Name_Id := N + $;
-   Name_Max_Command_Line_Length          : constant Name_Id := N + $;
-   Name_Metrics                          : constant Name_Id := N + $;
-   Name_Multi_Unit_Object_Separator      : constant Name_Id := N + $;
-   Name_Multi_Unit_Switches              : constant Name_Id := N + $;
-   Name_Naming                           : constant Name_Id := N + $;
-   Name_None                             : constant Name_Id := N + $;
-   Name_Object_File_Suffix               : constant Name_Id := N + $;
-   Name_Object_File_Switches             : constant Name_Id := N + $;
-   Name_Object_Generated                 : constant Name_Id := N + $;
-   Name_Object_List                      : constant Name_Id := N + $;
-   Name_Objects_Linked                   : constant Name_Id := N + $;
-   Name_Objects_Path                     : constant Name_Id := N + $;
-   Name_Objects_Path_File                : constant Name_Id := N + $;
-   Name_Object_Dir                       : constant Name_Id := N + $;
-   Name_Option_List                      : constant Name_Id := N + $;
-   Name_Path_Syntax                      : constant Name_Id := N + $;
-   Name_Pic_Option                       : constant Name_Id := N + $;
-   Name_Pretty_Printer                   : constant Name_Id := N + $;
-   Name_Prefix                           : constant Name_Id := N + $;
-   Name_Project                          : constant Name_Id := N + $;
-   Name_Project_Dir                      : constant Name_Id := N + $;
-   Name_Project_Files                    : constant Name_Id := N + $;
-   Name_Project_Path                     : constant Name_Id := N + $;
-   Name_Response_File_Format             : constant Name_Id := N + $;
-   Name_Response_File_Switches           : constant Name_Id := N + $;
-   Name_Roots                            : constant Name_Id := N + $; --  GPR
-   Name_Required_Switches                : constant Name_Id := N + $;
-   Name_Run_Path_Option                  : constant Name_Id := N + $;
-   Name_Run_Path_Origin                  : constant Name_Id := N + $;
-   Name_Separate_Run_Path_Options        : constant Name_Id := N + $;
-   Name_Shared_Library_Minimum_Switches  : constant Name_Id := N + $;
-   Name_Shared_Library_Prefix            : constant Name_Id := N + $;
-   Name_Shared_Library_Suffix            : constant Name_Id := N + $;
-   Name_Separate_Suffix                  : constant Name_Id := N + $;
-   Name_Source_Dirs                      : constant Name_Id := N + $;
-   Name_Source_File_Switches             : constant Name_Id := N + $;
-   Name_Source_Files                     : constant Name_Id := N + $;
-   Name_Source_List_File                 : constant Name_Id := N + $;
-   Name_Spec                             : constant Name_Id := N + $;
-   Name_Spec_Suffix                      : constant Name_Id := N + $;
-   Name_Specification                    : constant Name_Id := N + $;
-   Name_Specification_Exceptions         : constant Name_Id := N + $;
-   Name_Specification_Suffix             : constant Name_Id := N + $;
-   Name_Stack                            : constant Name_Id := N + $;
-   Name_Switches                         : constant Name_Id := N + $;
-   Name_Symbolic_Link_Supported          : constant Name_Id := N + $;
-   Name_Synchronize                      : constant Name_Id := N + $;
-   Name_Toolchain_Description            : constant Name_Id := N + $;
-   Name_Toolchain_Version                : constant Name_Id := N + $;
-   Name_Trailing_Required_Switches       : constant Name_Id := N + $;
-   Name_Runtime_Library_Dir              : constant Name_Id := N + $;
-   Name_Runtime_Source_Dir               : constant Name_Id := N + $;
+   Name_Aggregate                          : constant Name_Id := N + $;
+   Name_Archive_Builder                    : constant Name_Id := N + $;
+   Name_Archive_Builder_Append_Option      : constant Name_Id := N + $;
+   Name_Archive_Indexer                    : constant Name_Id := N + $;
+   Name_Archive_Suffix                     : constant Name_Id := N + $;
+   Name_Binder                             : constant Name_Id := N + $;
+   Name_Body_Suffix                        : constant Name_Id := N + $;
+   Name_Builder                            : constant Name_Id := N + $;
+   Name_Compiler                           : constant Name_Id := N + $;
+   Name_Compiler_Command                   : constant Name_Id := N + $; -- GB
+   Name_Config_Body_File_Name              : constant Name_Id := N + $;
+   Name_Config_Body_File_Name_Index        : constant Name_Id := N + $;
+   Name_Config_Body_File_Name_Pattern      : constant Name_Id := N + $;
+   Name_Config_File_Switches               : constant Name_Id := N + $;
+   Name_Config_File_Unique                 : constant Name_Id := N + $;
+   Name_Config_Spec_File_Name              : constant Name_Id := N + $;
+   Name_Config_Spec_File_Name_Index        : constant Name_Id := N + $;
+   Name_Config_Spec_File_Name_Pattern      : constant Name_Id := N + $;
+   Name_Configuration                      : constant Name_Id := N + $;
+   Name_Cross_Reference                    : constant Name_Id := N + $;
+   Name_Default_Language                   : constant Name_Id := N + $;
+   Name_Default_Switches                   : constant Name_Id := N + $;
+   Name_Dependency_Driver                  : constant Name_Id := N + $;
+   Name_Dependency_Kind                    : constant Name_Id := N + $;
+   Name_Dependency_Switches                : constant Name_Id := N + $;
+   Name_Driver                             : constant Name_Id := N + $;
+   Name_Excluded_Source_Dirs               : constant Name_Id := N + $;
+   Name_Excluded_Source_Files              : constant Name_Id := N + $;
+   Name_Excluded_Source_List_File          : constant Name_Id := N + $;
+   Name_Exec_Dir                           : constant Name_Id := N + $;
+   Name_Executable                         : constant Name_Id := N + $;
+   Name_Executable_Suffix                  : constant Name_Id := N + $;
+   Name_Extends                            : constant Name_Id := N + $;
+   Name_External_As_List                   : constant Name_Id := N + $;
+   Name_Externally_Built                   : constant Name_Id := N + $;
+   Name_Finder                             : constant Name_Id := N + $;
+   Name_Global_Compilation_Switches        : constant Name_Id := N + $;
+   Name_Global_Configuration_Pragmas       : constant Name_Id := N + $;
+   Name_Global_Config_File                 : constant Name_Id := N + $; -- GB
+   Name_Gnatls                             : constant Name_Id := N + $;
+   Name_Gnatstub                           : constant Name_Id := N + $;
+   Name_Gnu                                : constant Name_Id := N + $;
+   Name_Ide                                : constant Name_Id := N + $;
+   Name_Ignore_Source_Sub_Dirs             : constant Name_Id := N + $;
+   Name_Implementation                     : constant Name_Id := N + $;
+   Name_Implementation_Exceptions          : constant Name_Id := N + $;
+   Name_Implementation_Suffix              : constant Name_Id := N + $;
+   Name_Include_Switches                   : constant Name_Id := N + $;
+   Name_Include_Path                       : constant Name_Id := N + $;
+   Name_Include_Path_File                  : constant Name_Id := N + $;
+   Name_Inherit_Source_Path                : constant Name_Id := N + $;
+   Name_Languages                          : constant Name_Id := N + $;
+   Name_Language_Kind                      : constant Name_Id := N + $;
+   Name_Leading_Library_Options            : constant Name_Id := N + $;
+   Name_Leading_Required_Switches          : constant Name_Id := N + $;
+   Name_Leading_Switches                   : constant Name_Id := N + $;
+   Name_Library                            : constant Name_Id := N + $;
+   Name_Library_Ali_Dir                    : constant Name_Id := N + $;
+   Name_Library_Auto_Init                  : constant Name_Id := N + $;
+   Name_Library_Auto_Init_Supported        : constant Name_Id := N + $;
+   Name_Library_Builder                    : constant Name_Id := N + $;
+   Name_Library_Dir                        : constant Name_Id := N + $;
+   Name_Library_GCC                        : constant Name_Id := N + $;
+   Name_Library_Install_Name_Option        : constant Name_Id := N + $;
+   Name_Library_Interface                  : constant Name_Id := N + $;
+   Name_Library_Kind                       : constant Name_Id := N + $;
+   Name_Library_Name                       : constant Name_Id := N + $;
+   Name_Library_Major_Minor_Id_Supported   : constant Name_Id := N + $;
+   Name_Library_Options                    : constant Name_Id := N + $;
+   Name_Library_Partial_Linker             : constant Name_Id := N + $;
+   Name_Library_Reference_Symbol_File      : constant Name_Id := N + $;
+   Name_Library_Standalone                 : constant Name_Id := N + $;
+   Name_Library_Fully_Standalone_Options   : constant Name_Id := N + $;
+   Name_Library_Fully_Standalone_Supported : constant Name_Id := N + $; -- GB
+   Name_Library_Src_Dir                    : constant Name_Id := N + $;
+   Name_Library_Support                    : constant Name_Id := N + $;
+   Name_Library_Symbol_File                : constant Name_Id := N + $;
+   Name_Library_Symbol_Policy              : constant Name_Id := N + $;
+   Name_Library_Version                    : constant Name_Id := N + $;
+   Name_Library_Version_Switches           : constant Name_Id := N + $;
+   Name_Linker                             : constant Name_Id := N + $;
+   Name_Linker_Executable_Option           : constant Name_Id := N + $;
+   Name_Linker_Lib_Dir_Option              : constant Name_Id := N + $;
+   Name_Linker_Lib_Name_Option             : constant Name_Id := N + $;
+   Name_Local_Config_File                  : constant Name_Id := N + $; -- GB
+   Name_Local_Configuration_Pragmas        : constant Name_Id := N + $;
+   Name_Locally_Removed_Files              : constant Name_Id := N + $;
+   Name_Map_File_Option                    : constant Name_Id := N + $;
+   Name_Mapping_File_Switches              : constant Name_Id := N + $;
+   Name_Mapping_Spec_Suffix                : constant Name_Id := N + $;
+   Name_Mapping_Body_Suffix                : constant Name_Id := N + $;
+   Name_Max_Command_Line_Length            : constant Name_Id := N + $;
+   Name_Metrics                            : constant Name_Id := N + $;
+   Name_Multi_Unit_Object_Separator        : constant Name_Id := N + $;
+   Name_Multi_Unit_Switches                : constant Name_Id := N + $;
+   Name_Naming                             : constant Name_Id := N + $;
+   Name_None                               : constant Name_Id := N + $;
+   Name_Object_File_Suffix                 : constant Name_Id := N + $;
+   Name_Object_File_Switches               : constant Name_Id := N + $;
+   Name_Object_Generated                   : constant Name_Id := N + $;
+   Name_Object_List                        : constant Name_Id := N + $;
+   Name_Objects_Linked                     : constant Name_Id := N + $;
+   Name_Objects_Path                       : constant Name_Id := N + $;
+   Name_Objects_Path_File                  : constant Name_Id := N + $;
+   Name_Object_Dir                         : constant Name_Id := N + $;
+   Name_Option_List                        : constant Name_Id := N + $;
+   Name_Path_Syntax                        : constant Name_Id := N + $;
+   Name_Pic_Option                         : constant Name_Id := N + $;
+   Name_Pretty_Printer                     : constant Name_Id := N + $;
+   Name_Prefix                             : constant Name_Id := N + $;
+   Name_Project                            : constant Name_Id := N + $;
+   Name_Project_Dir                        : constant Name_Id := N + $;
+   Name_Project_Files                      : constant Name_Id := N + $;
+   Name_Project_Path                       : constant Name_Id := N + $;
+   Name_Response_File_Format               : constant Name_Id := N + $;
+   Name_Response_File_Switches             : constant Name_Id := N + $;
+   Name_Roots                              : constant Name_Id := N + $; -- GB
+   Name_Required_Switches                  : constant Name_Id := N + $;
+   Name_Run_Path_Option                    : constant Name_Id := N + $;
+   Name_Run_Path_Origin                    : constant Name_Id := N + $;
+   Name_Separate_Run_Path_Options          : constant Name_Id := N + $;
+   Name_Shared_Library_Minimum_Switches    : constant Name_Id := N + $;
+   Name_Shared_Library_Prefix              : constant Name_Id := N + $;
+   Name_Shared_Library_Suffix              : constant Name_Id := N + $;
+   Name_Separate_Suffix                    : constant Name_Id := N + $;
+   Name_Source_Dirs                        : constant Name_Id := N + $;
+   Name_Source_File_Switches               : constant Name_Id := N + $;
+   Name_Source_Files                       : constant Name_Id := N + $;
+   Name_Source_List_File                   : constant Name_Id := N + $;
+   Name_Spec                               : constant Name_Id := N + $;
+   Name_Spec_Suffix                        : constant Name_Id := N + $;
+   Name_Specification                      : constant Name_Id := N + $;
+   Name_Specification_Exceptions           : constant Name_Id := N + $;
+   Name_Specification_Suffix               : constant Name_Id := N + $;
+   Name_Stack                              : constant Name_Id := N + $;
+   Name_Switches                           : constant Name_Id := N + $;
+   Name_Symbolic_Link_Supported            : constant Name_Id := N + $;
+   Name_Synchronize                        : constant Name_Id := N + $;
+   Name_Toolchain_Description              : constant Name_Id := N + $;
+   Name_Toolchain_Version                  : constant Name_Id := N + $;
+   Name_Trailing_Required_Switches         : constant Name_Id := N + $;
+   Name_Runtime_Library_Dir                : constant Name_Id := N + $;
+   Name_Runtime_Source_Dir                 : constant Name_Id := N + $;
 
    --  Other miscellaneous names used in front end