summaryrefslogtreecommitdiff
path: root/gcc/ada/mlib-prj.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:14:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:14:34 +0000
commita6eaa55180ee27619fab2b8863f2fc024ce05a56 (patch)
treea8d42a81e79abc47cb8938eacf7a68faab31a1df /gcc/ada/mlib-prj.adb
parent952af0b947ceddafdfb06b495e25ccd3f3883c76 (diff)
downloadgcc-a6eaa55180ee27619fab2b8863f2fc024ce05a56.tar.gz
2005-12-05 Doug Rupp <rupp@adacore.com>
* mlib-tgt-vms-ia64.adb, mlib-tgt-vms-alpha.adb (Is_Interface): Change Ada bind file prefix on VMS from b$ to b__. (Build_Dynamic_Library): Change Init file suffix on VMS from $init to __init. * prj-nmsc.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_Suffix): Initialize with target object suffix. (Get_Unit): Change Ada bind file prefix on VMS from b$ to b__. * butil.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. * clean.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_Suffix): Initialize with call to Get_Target_Object_Suffix. ({declaraction},Delete_Binder_Generated_Files,{initialization}): Change Ada bind file prefix on VMS from b$ to b__. * gnatlink.adb (Process_Args): Call Add_Src_Search_Dir for -I in --GCC so that Get_Target_Parameters can find system.ads. (Gnatlink): Call Get_Target_Parameters in mainline. Initialize standard packages for Targparm. Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Process_Args): Also Check for object files with target object extension. (Make_Binder_File_Names): Create with target object extension. (Make_Binder_File_Names): Change Ada bind file prefix on VMS from b$ to b__. * mlib-prj.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. ({declaration},Build_Library,Check_Library): Change Ada bind file prefix on VMS from b$ to b__. * osint-b.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Create_Binder_Output): Change Ada bind file prefix on VMS from b$ to b__. * targext.c: New file. * Makefile.in: add support for vxworks653 builds (../../vxaddr2line): gnatlink with targext.o. (TOOLS_LIBS): Move targext.o to precede libgnat. (init.o, initialize.o): Minor clean up in dependencies. (GNATLINK_OBJS): Add targparm.o, snames.o Add rules fo building targext.o and linking it explicitly with all tools. Also add targext.o to gnatlib. * Make-lang.in: Add rules for building targext.o and linking it in with gnat1 and gnatbind. Add entry for exp_sel.o. * osint.adb Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_File_Name): Use target object suffix. * osint.ads (Object_Suffix): Remove, no longer used. (Target_Object_Suffix): Initialize with target object suffix. * rident.ads: Add special exception to license. * targparm.adb (Get_Target_Parameters): Set the value of Multi_Unit_Index_Character after OpenVMS_On_Target gets its definitive value. (Get_Target_Parameters): Set OpenVMS_On_Target if openvms. * targparm.ads: Add special exception to license. * g-os_lib.ads, g-os_lib.adb (Get_Target_Debuggable_Suffix): New function. (Copy_File): Make sure from file is closed if error on to file (Get_Target_Executable_Suffix, Get_Target_Object_Suffix): New functions. * make.adb (Object_Suffix): Intialize with Get_Target_Object_Suffix. (Executable_Suffix): Intialize with Get_Target_Executable_Suffix. * osint-c.adb (Set_Output_Object_File_Name): Initialize extension with target object suffix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108285 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-prj.adb')
-rw-r--r--gcc/ada/mlib-prj.adb41
1 files changed, 21 insertions, 20 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index f6e65be16f4..6cae545c2de 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -26,7 +26,6 @@
with ALI; use ALI;
with Gnatvsn; use Gnatvsn;
-with Hostparm;
with MLib.Fil; use MLib.Fil;
with MLib.Tgt; use MLib.Tgt;
with MLib.Utl; use MLib.Utl;
@@ -40,6 +39,7 @@ with Sinput.P;
with Snames; use Snames;
with Switch; use Switch;
with Table;
+with Targparm; use Targparm;
with Ada.Characters.Handling;
@@ -55,12 +55,13 @@ package body MLib.Prj is
pragma Import (C, Prj_Add_Obj_Files, "__gnat_prj_add_obj_files");
Add_Object_Files : constant Boolean := Prj_Add_Obj_Files /= 0;
-- Indicates if object files in pragmas Linker_Options (found in the
- -- binder generated file) should be taken when linking aq stand-alone
- -- library.
- -- False for Windows, True for other platforms.
+ -- binder generated file) should be taken when linking a stand-alone
+ -- library. False for Windows, True for other platforms.
ALI_Suffix : constant String := ".ali";
- B_Start : String := "b~";
+
+ B_Start : String_Ptr := new String'("b~");
+ -- Prefix of bind file, changed to b__ for VMS
S_Osinte_Ads : Name_Id := No_Name;
-- Name_Id for "s-osinte.ads"
@@ -515,7 +516,7 @@ package body MLib.Prj is
begin
if not Libgnarl_Needed or
- (Hostparm.OpenVMS and then
+ (OpenVMS_On_Target and then
((not Libdecgnat_Needed) or
(not Gtrasymobj_Needed)))
then
@@ -542,7 +543,7 @@ package body MLib.Prj is
if ALI.Sdep.Table (Index).Sfile = S_Osinte_Ads then
Libgnarl_Needed := True;
- elsif Hostparm.OpenVMS then
+ elsif OpenVMS_On_Target then
if ALI.Sdep.Table (Index).Sfile = S_Dec_Ads then
Libdecgnat_Needed := True;
@@ -799,18 +800,18 @@ package body MLib.Prj is
Arguments := new String_List (1 .. Initial_Argument_Max);
end if;
- -- Add "-n -o b~<lib>.adb (b$<lib>.adb on VMS) -L<lib>"
+ -- Add "-n -o b~<lib>.adb (b__<lib>.adb on VMS) -L<lib>"
Argument_Number := 2;
Arguments (1) := No_Main;
Arguments (2) := Output_Switch;
- if Hostparm.OpenVMS then
- B_Start (B_Start'Last) := '$';
+ if OpenVMS_On_Target then
+ B_Start := new String'("b__");
end if;
Add_Argument
- (B_Start & Get_Name_String (Data.Library_Name) & ".adb");
+ (B_Start.all & Get_Name_String (Data.Library_Name) & ".adb");
Add_Argument ("-L" & Get_Name_String (Data.Library_Name));
if Data.Lib_Auto_Init and then SALs_Use_Constructors then
@@ -1006,7 +1007,7 @@ package body MLib.Prj is
In_Tree => In_Tree,
Including_Libraries => True);
- -- Invoke <gcc> -c b$$<lib>.adb
+ -- Invoke <gcc> -c b__<lib>.adb
-- Allocate Arguments, if it is the first time we see a standalone
-- library.
@@ -1018,12 +1019,12 @@ package body MLib.Prj is
Argument_Number := 1;
Arguments (1) := Compile_Switch;
- if Hostparm.OpenVMS then
- B_Start (B_Start'Last) := '$';
+ if OpenVMS_On_Target then
+ B_Start := new String'("b__");
end if;
Add_Argument
- (B_Start & Get_Name_String (Data.Library_Name) & ".adb");
+ (B_Start.all & Get_Name_String (Data.Library_Name) & ".adb");
-- If necessary, add the PIC option
@@ -1160,7 +1161,7 @@ package body MLib.Prj is
-- Add the objects found in the object directory and the object
-- directories of the extended files, if any, except for generated
- -- object files (b~.. or B$..) from extended projects.
+ -- object files (b~.. or B__..) from extended projects.
-- When there are one or more extended files, only add an object file
-- if no object file with the same name have already been added.
@@ -1203,7 +1204,7 @@ package body MLib.Prj is
if In_Main_Object_Directory
or else Last < 5
- or else Filename (1 .. B_Start'Length) /= B_Start
+ or else Filename (1 .. B_Start'Length) /= B_Start.all
then
Name_Len := Last;
Name_Buffer (1 .. Name_Len) := Filename (1 .. Last);
@@ -1790,8 +1791,8 @@ package body MLib.Prj is
Object_Dir : Dir_Type;
begin
- if Hostparm.OpenVMS then
- B_Start (B_Start'Last) := '$';
+ if OpenVMS_On_Target then
+ B_Start := new String'("b__");
end if;
-- If the library file does not exist, then the time stamp will
@@ -1810,7 +1811,7 @@ package body MLib.Prj is
-- generated file.
if Is_Obj (Name_Buffer (1 .. Name_Len))
- and then Name_Buffer (1 .. B_Start'Length) /= B_Start
+ and then Name_Buffer (1 .. B_Start'Length) /= B_Start.all
then
-- Get the object file time stamp