diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 09:28:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 09:28:10 +0000 |
commit | 41a3f74726436ca62ce629a2193bfa768eadb8a5 (patch) | |
tree | e80bc0010abd61710289dc0d21c3388988b71aeb /gcc/ada/mlib-prj.adb | |
parent | 233f5cc2fd7d585bc337f82c653a859be612aee8 (diff) | |
download | gcc-41a3f74726436ca62ce629a2193bfa768eadb8a5.tar.gz |
2011-08-29 Thomas Quinot <quinot@adacore.com>
* get_scos.adb: When reading a P statement SCO without a pragma name
(from an older ALI file), ensure that the Pragma_Name component is set
to Unknown_Pragma (not left uninitialized).
2011-08-29 Vincent Celier <celier@adacore.com>
* makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
modified to compute correctly the object path of a SAL project that is
extending another library project.
(Write_Path_File): New procedure.
* makeutl.ads (Directories): New table moved from Buildgpr
(Get_Directories): New procedure moved from Buildgpr
(Write_Path_File): New procedure
* mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
paths before binding SALs, instead of Set_Ada_Paths.
* prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
Prj.
* prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
(Current_Source_Path_File_Of): New function
(Set_Current_Object_Path_File_Of): New procedure
(Current_Source_Object_File_Of): New function
(Set_Current_Object_Path_File_Of): New procedure
* prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
(Current_Source_Path_File_Of): New function
(Set_Current_Object_Path_File_Of): New procedure
(Current_Source_Object_File_Of): New function
(Set_Current_Object_Path_File_Of): New procedure
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
packed entity, use a bit-field assignment only if there is no change of
representation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178177 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-prj.adb')
-rw-r--r-- | gcc/ada/mlib-prj.adb | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb index 9ac12e74061..b01ad9d1ea2 100644 --- a/gcc/ada/mlib-prj.adb +++ b/gcc/ada/mlib-prj.adb @@ -25,6 +25,7 @@ with ALI; use ALI; with Gnatvsn; use Gnatvsn; +with Makeutl; use Makeutl; with MLib.Fil; use MLib.Fil; with MLib.Tgt; use MLib.Tgt; with MLib.Utl; use MLib.Utl; @@ -802,6 +803,9 @@ package body MLib.Prj is end loop; end Process_Imported_Libraries; + Path_FD : File_Descriptor := Invalid_FD; + -- Used for setting the source and object paths + -- Start of processing for Build_Library begin @@ -1044,10 +1048,56 @@ package body MLib.Prj is -- Set the paths - Set_Ada_Paths - (Project => For_Project, - In_Tree => In_Tree, - Including_Libraries => True); + -- First the source path + + if For_Project.Include_Path_File = No_Path then + Get_Directories + (Project_Tree => In_Tree, + For_Project => For_Project, + Activity => Compilation, + Languages => Ada_Only); + + Create_New_Path_File + (In_Tree.Shared, Path_FD, For_Project.Include_Path_File); + + Write_Path_File (Path_FD); + Path_FD := Invalid_FD; + + end if; + + if Current_Source_Path_File_Of (In_Tree.Shared) /= + For_Project.Include_Path_File + then + Set_Current_Source_Path_File_Of + (In_Tree.Shared, + For_Project.Include_Path_File); + Set_Path_File_Var + (Project_Include_Path_File, + Get_Name_String (For_Project.Include_Path_File)); + end if; + + -- Then, the object path + + Get_Directories + (Project_Tree => In_Tree, + For_Project => For_Project, + Activity => SAL_Binding, + Languages => Ada_Only); + + declare + Path_File_Name : Path_Name_Type; + begin + Create_New_Path_File (In_Tree.Shared, Path_FD, Path_File_Name); + + Write_Path_File (Path_FD); + Path_FD := Invalid_FD; + + Set_Path_File_Var + (Project_Objects_Path_File, + Get_Name_String (Path_File_Name)); + Set_Current_Source_Path_File_Of + (In_Tree.Shared, Path_File_Name); + end; -- Display the gnatbind command, if not in quiet output |