summaryrefslogtreecommitdiff
path: root/gcc/ada/mlib-prj.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/mlib-prj.adb')
-rw-r--r--gcc/ada/mlib-prj.adb49
1 files changed, 37 insertions, 12 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index b55d801388d..97dee952dc6 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -71,6 +71,9 @@ package body MLib.Prj is
S_Dec_Ads : Name_Id := No_Name;
-- Name_Id for "dec.ads"
+ G_Trasym_Ads : Name_Id := No_Name;
+ -- Name_Id for "g-trasym.ads"
+
No_Argument_List : aliased String_List := (1 .. 0 => null);
No_Argument : constant String_List_Access := No_Argument_List'Access;
@@ -308,6 +311,10 @@ package body MLib.Prj is
Libdecgnat_Needed : Boolean := False;
-- On OpenVMS, set to 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.
+
Data : Project_Data := Projects.Table (For_Project);
Object_Directory_Path : constant String :=
@@ -372,7 +379,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).
+ -- case when there is a dependency on dec.ads), and 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
@@ -506,7 +514,9 @@ package body MLib.Prj is
begin
if not Libgnarl_Needed or
- (Hostparm.OpenVMS and then (not Libdecgnat_Needed))
+ (Hostparm.OpenVMS and then
+ ((not Libdecgnat_Needed) or
+ (not Gtrasymobj_Needed)))
then
-- Scan the ALI file
@@ -531,10 +541,13 @@ package body MLib.Prj is
if ALI.Sdep.Table (Index).Sfile = S_Osinte_Ads then
Libgnarl_Needed := True;
- elsif Hostparm.OpenVMS and then
- ALI.Sdep.Table (Index).Sfile = S_Dec_Ads
- then
- Libdecgnat_Needed := True;
+ elsif Hostparm.OpenVMS then
+ if ALI.Sdep.Table (Index).Sfile = S_Dec_Ads then
+ Libdecgnat_Needed := True;
+
+ elsif ALI.Sdep.Table (Index).Sfile = G_Trasym_Ads then
+ Gtrasymobj_Needed := True;
+ end if;
end if;
end loop;
end if;
@@ -741,17 +754,23 @@ package body MLib.Prj is
-- of "s-osinte.ads".
if S_Osinte_Ads = No_Name then
- Name_Len := 12;
- Name_Buffer (1 .. Name_Len) := "s-osinte.ads";
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer ("s-osinte.ads");
S_Osinte_Ads := Name_Find;
end if;
if S_Dec_Ads = No_Name then
- Name_Len := 7;
- Name_Buffer (1 .. Name_Len) := "dec.ads";
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer ("dec.ads");
S_Dec_Ads := Name_Find;
end if;
+ if G_Trasym_Ads = No_Name then
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer ("g-trasym.ads");
+ G_Trasym_Ads := Name_Find;
+ end if;
+
-- We work in the object directory
Change_Dir (Object_Directory_Path);
@@ -1193,8 +1212,8 @@ package body MLib.Prj is
new String'(ALI_File);
-- Find out if for this ALI file,
- -- libgnarl or libdecgnat (on OpenVMS)
- -- is necessary.
+ -- libgnarl or libdecgnat or g-trasym.obj
+ -- (on OpenVMS) is necessary.
Check_Libs (ALI_File);
@@ -1255,6 +1274,12 @@ package body MLib.Prj is
end if;
end if;
+ if Gtrasymobj_Needed then
+ Opts.Increment_Last;
+ Opts.Table (Opts.Last) :=
+ new String'(Lib_Directory & "/g-trasym.obj");
+ end if;
+
if Libdecgnat_Needed then
Opts.Increment_Last;
Opts.Table (Opts.Last) :=