summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-env.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 15:57:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 15:57:17 +0000
commit9e7f0d65ef532a514da45902e3fdd46deb425897 (patch)
tree6924a2255be2eb95a5d6c5d398e92a5e2c5d0642 /gcc/ada/prj-env.adb
parente5d3809518f21782142f679e36c901e6da9ba9b8 (diff)
downloadgcc-9e7f0d65ef532a514da45902e3fdd46deb425897.tar.gz
2011-08-01 Pascal Obry <obry@adacore.com>
* prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass Target_Name to Get_Path call. (Parse_Single_Project): Likewise. (Post_Parse_Context_Clause): Likewise. * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter. Call Initialise_Project_Path with the proper Target_Name. (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat search path. (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path with the proper Target_Name. * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to Part.Parse routine. (Parse_Project_And_Apply_Config): Likewise. * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine. This is fine as this part of the code is supporting only native compilation. * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This is fine as this part of the code is supporting only native compilation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177054 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-env.adb')
-rw-r--r--gcc/ada/prj-env.adb16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index 2e0cb8a915d..180d0d0451b 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -1937,6 +1937,10 @@ package body Prj.Env is
(Path_Separator & Prefix.all &
"lib" & Directory_Separator & "gpr" &
Directory_Separator & Target_Name);
+ Add_Str_To_Name_Buffer
+ (Path_Separator & Prefix.all &
+ Target_Name & Directory_Separator &
+ "lib" & Directory_Separator & "gnat");
end if;
Add_Str_To_Name_Buffer
@@ -1970,11 +1974,12 @@ package body Prj.Env is
--------------
procedure Get_Path
- (Self : in out Project_Search_Path;
- Path : out String_Access)
+ (Self : in out Project_Search_Path;
+ Path : out String_Access;
+ Target_Name : String := "")
is
begin
- Initialize_Project_Path (Self, ""); -- ??? Target_Name unspecified
+ Initialize_Project_Path (Self, Target_Name);
Path := Self.Path;
end Get_Path;
@@ -1998,7 +2003,8 @@ package body Prj.Env is
(Self : in out Project_Search_Path;
Project_File_Name : String;
Directory : String;
- Path : out Namet.Path_Name_Type)
+ Path : out Namet.Path_Name_Type;
+ Target_Name : String)
is
File : constant String := Project_File_Name;
-- Have to do a copy, in case the parameter is Name_Buffer, which we
@@ -2087,7 +2093,7 @@ package body Prj.Env is
-- Start of processing for Find_Project
begin
- Initialize_Project_Path (Self, "");
+ Initialize_Project_Path (Self, Target_Name);
if Current_Verbosity = High then
Write_Str ("Searching for project (""");