diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-04 13:26:18 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-04 13:26:18 +0000 |
commit | fb31b465671914141a8fca9e13a135257994de37 (patch) | |
tree | d05fc3ff905800886f21e31cfce3310be6ebf1a9 /gcc/ada/mlib-tgt-tru64.adb | |
parent | 84c19f51c942a277055dc44cbbf5e5b43e6320b2 (diff) | |
download | gcc-fb31b465671914141a8fca9e13a135257994de37.tar.gz |
2005-07-04 Vincent Celier <celier@adacore.com>
* mlib-tgt-tru64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-solaris.adb,
mlib-tgt-mingw.adb, mlib-tgt-darwin.adb (Build_Dynamic_Library):
Remove all auto-initialization code, as this is now done through the
constructor mechanism.
* adaint.h, adaint.c (__gnat_binder_supports_auto_init,
__gnat_sals_init_using_constructors): New functions.
* bindgen.adb (Gen_Output_File_Ada): Generate pragmas
Linker_Constructor and Linker_Destructor when switch -a is used.
* bindusg.adb: Add line for new switch -a
* gnatbind.adb (Gnatbind_Supports_Auto_Init): New Boolean function
(Gnatbind): When switch -a is used, check if it is allowed
* switch-b.adb (Scan_Binder_Switches): Process new switch -a
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101573 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-tgt-tru64.adb')
-rw-r--r-- | gcc/ada/mlib-tgt-tru64.adb | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/gcc/ada/mlib-tgt-tru64.adb b/gcc/ada/mlib-tgt-tru64.adb index 267f65db6c1..b6d954902df 100644 --- a/gcc/ada/mlib-tgt-tru64.adb +++ b/gcc/ada/mlib-tgt-tru64.adb @@ -45,21 +45,6 @@ package body MLib.Tgt is Expect_Unresolved : aliased String := "-Wl,-expect_unresolved,*"; - No_Arguments : aliased Argument_List := (1 .. 0 => null); - Empty_Argument_List : constant Argument_List_Access := No_Arguments'Access; - - Wl_Init_String : aliased String := "-Wl,-init"; - Wl_Init : constant String_Access := Wl_Init_String'Access; - Wl_Fini_String : aliased String := "-Wl,-fini"; - Wl_Fini : constant String_Access := Wl_Fini_String'Access; - - Init_Fini_List : constant Argument_List_Access := - new Argument_List'(1 => Wl_Init, - 2 => null, - 3 => Wl_Fini, - 4 => null); - -- Used to put switches for automatic elaboration/finalization - --------------------- -- Archive_Builder -- --------------------- @@ -127,6 +112,8 @@ package body MLib.Tgt is pragma Unreferenced (Afiles); pragma Unreferenced (Interfaces); pragma Unreferenced (Symbol_Data); + pragma Unreferenced (Auto_Init); + -- Initialization is done through the contructor mechanism Lib_File : constant String := Lib_Dir & Directory_Separator & "lib" & @@ -135,8 +122,6 @@ package body MLib.Tgt is Version_Arg : String_Access; Symbolic_Link_Needed : Boolean := False; - Init_Fini : Argument_List_Access := Empty_Argument_List; - begin if Opt.Verbose_Mode then Write_Str ("building relocatable shared library "); @@ -145,20 +130,11 @@ package body MLib.Tgt is -- If specified, add automatic elaboration/finalization - if Auto_Init then - Init_Fini := Init_Fini_List; - Init_Fini (2) := new String'("-Wl," & Lib_Filename & "init"); - Init_Fini (4) := new String'("-Wl," & Lib_Filename & "final"); - end if; - if Lib_Version = "" then Utl.Gcc (Output_File => Lib_File, Objects => Ofiles, - Options => - Options & - Expect_Unresolved'Access & - Init_Fini.all, + Options => Options & Expect_Unresolved'Access, Options_2 => Options_2, Driver_Name => Driver_Name); @@ -170,10 +146,7 @@ package body MLib.Tgt is (Output_File => Lib_Version, Objects => Ofiles, Options => - Options & - Version_Arg & - Expect_Unresolved'Access & - Init_Fini.all, + Options & Version_Arg & Expect_Unresolved'Access, Options_2 => Options_2, Driver_Name => Driver_Name); Symbolic_Link_Needed := Lib_Version /= Lib_File; @@ -183,10 +156,7 @@ package body MLib.Tgt is (Output_File => Lib_Dir & Directory_Separator & Lib_Version, Objects => Ofiles, Options => - Options & - Version_Arg & - Expect_Unresolved'Access & - Init_Fini.all, + Options & Version_Arg & Expect_Unresolved'Access, Options_2 => Options_2, Driver_Name => Driver_Name); Symbolic_Link_Needed := |