aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/osint-b.adb
diff options
context:
space:
mode:
authorDoug Rupp <rupp@adacore.com>2005-12-09 18:14:34 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-12-09 18:14:34 +0100
commitbb4daba3460df28e1228e04f7d2a63712c709a7e (patch)
treea8d42a81e79abc47cb8938eacf7a68faab31a1df /gcc/ada/osint-b.adb
parent4d744221db2ca7b17e1734998d8fb9a7b67608ca (diff)
downloadgcc-bb4daba3460df28e1228e04f7d2a63712c709a7e.zip
gcc-bb4daba3460df28e1228e04f7d2a63712c709a7e.tar.gz
gcc-bb4daba3460df28e1228e04f7d2a63712c709a7e.tar.bz2
mlib-tgt-vms-ia64.adb, [...] (Is_Interface): Change Ada bind file prefix on VMS from b$ to b__.
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. From-SVN: r108285
Diffstat (limited to 'gcc/ada/osint-b.adb')
-rw-r--r--gcc/ada/osint-b.adb43
1 files changed, 28 insertions, 15 deletions
diff --git a/gcc/ada/osint-b.adb b/gcc/ada/osint-b.adb
index 6d4f383..2dc070e 100644
--- a/gcc/ada/osint-b.adb
+++ b/gcc/ada/osint-b.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -24,9 +24,9 @@
-- --
------------------------------------------------------------------------------
-with Hostparm;
-with Namet; use Namet;
-with Opt; use Opt;
+with Namet; use Namet;
+with Opt; use Opt;
+with Targparm; use Targparm;
package body Osint.B is
@@ -71,6 +71,10 @@ package body Osint.B is
Findex2 : Natural;
Flength : Natural;
+ Bind_File_Prefix_Len : Natural := 2;
+ -- Length of binder file prefix (normally set to 2 for b~, but gets
+ -- reset to 3 for VMS for b__).
+
begin
if Output_File_Name /= "" then
Name_Buffer (Output_File_Name'Range) := Output_File_Name;
@@ -112,16 +116,24 @@ package body Osint.B is
if Maximum_File_Name_Length > 0 then
+ if OpenVMS_On_Target and then Typ /= 'c' then
+ Bind_File_Prefix_Len := 3;
+ end if;
+
-- Make room for the extra two characters in "b?"
- while Int (Flength) > Maximum_File_Name_Length - 2 loop
+ while Int (Flength) >
+ Maximum_File_Name_Length - Nat (Bind_File_Prefix_Len)
+ loop
Findex2 := Findex2 - 1;
Flength := Findex2 - Findex1;
end loop;
end if;
- Name_Buffer (3 .. Flength + 2) := File_Name (Findex1 .. Findex2 - 1);
- Name_Buffer (Flength + 3) := '.';
+ Name_Buffer
+ (Bind_File_Prefix_Len + 1 .. Flength + Bind_File_Prefix_Len) :=
+ File_Name (Findex1 .. Findex2 - 1);
+ Name_Buffer (Flength + Bind_File_Prefix_Len + 1) := '.';
-- C bind file, name is b_xxx.c
@@ -132,20 +144,21 @@ package body Osint.B is
Name_Len := Flength + 4;
-- Ada bind file, name is b~xxx.adb or b~xxx.ads
- -- (with $ instead of ~ in VMS)
+ -- (with __ instead of ~ in VMS)
else
- if Hostparm.OpenVMS then
- Name_Buffer (2) := '$';
+ if OpenVMS_On_Target then
+ Name_Buffer (2) := '_';
+ Name_Buffer (3) := '_';
else
Name_Buffer (2) := '~';
end if;
- Name_Buffer (Flength + 4) := 'a';
- Name_Buffer (Flength + 5) := 'd';
- Name_Buffer (Flength + 6) := Typ;
- Name_Buffer (Flength + 7) := ASCII.NUL;
- Name_Len := Flength + 6;
+ Name_Buffer (Flength + Bind_File_Prefix_Len + 2) := 'a';
+ Name_Buffer (Flength + Bind_File_Prefix_Len + 3) := 'd';
+ Name_Buffer (Flength + Bind_File_Prefix_Len + 4) := Typ;
+ Name_Buffer (Flength + Bind_File_Prefix_Len + 5) := ASCII.NUL;
+ Name_Len := Flength + Bind_File_Prefix_Len + 4;
end if;
end if;