diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 11:41:50 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 11:41:50 +0200 |
commit | 19fb051ccb54f06f292307830cb5bce6bf6268bd (patch) | |
tree | 583d07f48683ebbc4092aa606fc00a067241259c /gcc/ada/mlib-prj.adb | |
parent | e443b7f97eab2f7c8e2640ee840801ce2eb2c008 (diff) | |
download | gcc-19fb051ccb54f06f292307830cb5bce6bf6268bd.zip gcc-19fb051ccb54f06f292307830cb5bce6bf6268bd.tar.gz gcc-19fb051ccb54f06f292307830cb5bce6bf6268bd.tar.bz2 |
[multiple changes]
2011-08-02 Robert Dewar <dewar@adacore.com>
* mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
reformatting.
2011-08-02 Robert Dewar <dewar@adacore.com>
* aspects.adb: New aspects Default_Value and Default_Component_Value
New format of Aspect_Names table checks for omitted entries
* aspects.ads: Remove mention of Aspect_Cancel and add documentation on
handling of boolean aspects for derived types.
New aspects Default_Value and Default_Component_Value
New format of Aspect_Names table checks for omitted entries
* einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
(Has_Default_Value): New flag
(Has_Default_Component_Value): New flag
(Has_Default_Value): New flag
* par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
table.
* par-prag.adb: New pragmas Default_Value and Default_Component_Value
* sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
Default_Value and Default_Component_Value
* sem_prag.adb: New pragmas Default_Value and Default_Component_Value
New aspects Default_Value and Default_Component_Value
* snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
* sprint.adb: Print N_Aspect_Specification node when called from gdb
2011-08-02 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
Minor reformatting.
2011-08-02 Robert Dewar <dewar@adacore.com>
* i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
From-SVN: r177110
Diffstat (limited to 'gcc/ada/mlib-prj.adb')
-rw-r--r-- | gcc/ada/mlib-prj.adb | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb index 4050382..656b9d4 100644 --- a/gcc/ada/mlib-prj.adb +++ b/gcc/ada/mlib-prj.adb @@ -73,26 +73,29 @@ package body MLib.Prj is -- Name_Id for "g-trasym.ads" Arguments : String_List_Access := No_Argument; - -- Used to accumulate arguments for the invocation of gnatbind and of - -- the compiler. Also used to collect the interface ALI when copying - -- the ALI files to the library directory. + -- Used to accumulate arguments for the invocation of gnatbind and of the + -- compiler. Also used to collect the interface ALI when copying the ALI + -- files to the library directory. Argument_Number : Natural := 0; -- Index of the last argument in Arguments Initial_Argument_Max : constant := 10; + -- Where does the magic constant 10 come from??? - No_Main_String : aliased String := "-n"; - No_Main : constant String_Access := No_Main_String'Access; + No_Main_String : aliased String := "-n"; + No_Main : constant String_Access := No_Main_String'Access; - Output_Switch_String : aliased String := "-o"; - Output_Switch : constant String_Access := Output_Switch_String'Access; + Output_Switch_String : aliased String := "-o"; + Output_Switch : constant String_Access := + Output_Switch_String'Access; - Compile_Switch_String : aliased String := "-c"; - Compile_Switch : constant String_Access := Compile_Switch_String'Access; + Compile_Switch_String : aliased String := "-c"; + Compile_Switch : constant String_Access := + Compile_Switch_String'Access; - No_Warning_String : aliased String := "-gnatws"; - No_Warning : constant String_Access := No_Warning_String'Access; + No_Warning_String : aliased String := "-gnatws"; + No_Warning : constant String_Access := No_Warning_String'Access; Auto_Initialize : constant String := "-a"; @@ -296,27 +299,24 @@ package body MLib.Prj is is Maximum_Size : Integer; pragma Import (C, Maximum_Size, "__gnat_link_max"); - -- Maximum number of bytes to put in an invocation of the - -- gnatbind. + -- Maximum number of bytes to put in an invocation of gnatbind Size : Integer; - -- The number of bytes for the invocation of the gnatbind + -- The number of bytes for the invocation of gnatbind Warning_For_Library : Boolean := False; - -- Set to True for the first warning about a unit missing from the - -- interface set. + -- Set True for first warning for a unit missing from the interface set Current_Proj : Project_Id; Libgnarl_Needed : Yes_No_Unknown := For_Project.Libgnarl_Needed; - -- Set to True if library needs to be linked with libgnarl + -- Set True if library needs to be linked with libgnarl Libdecgnat_Needed : Boolean := False; - -- On OpenVMS, set to True if library needs to be linked with libdecgnat + -- On OpenVMS, set True if library needs to be linked with libdecgnat Gtrasymobj_Needed : Boolean := False; - -- On OpenVMS, set to True if library needs to be linked with - -- g-trasym.obj. + -- On OpenVMS, set rue if library needs to be linked with g-trasym.obj Object_Directory_Path : constant String := Get_Name_String @@ -354,15 +354,14 @@ package body MLib.Prj is -- Initial size of Rpath, when first allocated Path_Option : String_Access := Linker_Library_Path_Option; - -- If null, Path Option is not supported. - -- Not a constant so that it can be deallocated. + -- If null, Path Option is not supported. Not a constant so that it can + -- be deallocated. First_ALI : File_Name_Type := No_File; -- Store the ALI file name of a source of the library (the first found) procedure Add_ALI_For (Source : File_Name_Type); - -- Add the name of the ALI file corresponding to Source to the - -- Arguments. + -- Add name of the ALI file corresponding to Source to the Arguments procedure Add_Rpath (Path : String); -- Add a path name to Rpath @@ -375,8 +374,8 @@ package body MLib.Prj is -- to link with -lgnarl (this is the case when there is a dependency -- on s-osinte.ads). On OpenVMS, set Libdecgnat_Needed if the ALI file -- indicates that there is a need to link with -ldecgnat (this is the - -- case when there is a dependency on dec.ads), and set - -- Gtrasymobj_Needed if there is a dependency on g-trasym.ads. + -- case when there is a dependency on dec.ads). Set Gtrasymobj_Needed + -- if there is a dependency on g-trasym.ads. procedure Process (The_ALI : File_Name_Type); -- Check if the closure of a library unit which is or should be in the @@ -914,9 +913,9 @@ package body MLib.Prj is In_Tree.Packages.Table (Binder_Package).Decl.Arrays, In_Tree => In_Tree); - Switches : Variable_Value := Nil_Variable_Value; - Switch : String_List_Id := Nil_String; + Switches : Variable_Value := Nil_Variable_Value; + Switch : String_List_Id := Nil_String; begin if Defaults /= No_Array_Element then @@ -1180,8 +1179,7 @@ package body MLib.Prj is -- Invoke <gcc> -c b__<lib>.adb - -- Allocate Arguments, if it is the first time we see a standalone - -- library. + -- Allocate Arguments, if first time we see a standalone library if Arguments = No_Argument then Arguments := new String_List (1 .. Initial_Argument_Max); @@ -1247,8 +1245,7 @@ package body MLib.Prj is end; end if; - -- Now that all the arguments are set, compile the binder - -- generated file. + -- Now all the arguments are set, compile binder generated file Display (Gcc); Spawn @@ -1277,8 +1274,7 @@ package body MLib.Prj is Driver_Name := Name_Id (For_Project.Config.Shared_Lib_Driver); end if; - -- If attribute Library_Options was specified, add these additional - -- options. + -- If attribute Library_Options was specified, add these options Library_Options := Value_Of (Name_Library_Options, For_Project.Decl.Attributes, In_Tree); @@ -1353,7 +1349,7 @@ package body MLib.Prj is loop if Current_Proj.Object_Directory /= No_Path_Information then - -- The following code gets far too indented, I suggest some + -- The following code gets far too indented ... suggest some -- procedural abstraction here. How about making this declare -- block a named procedure??? @@ -1557,8 +1553,7 @@ package body MLib.Prj is Opts.Increment_Last; Opts.Table (Opts.Last) := new String'("-L" & Lib_Directory); - -- If Path Option is supported, add libgnat directory path name to - -- Rpath. + -- If Path Option supported, add libgnat directory path name to Rpath if Path_Option /= null then declare |