diff options
author | Vincent Celier <celier@adacore.com> | 2005-07-04 15:26:18 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-07-04 15:26:18 +0200 |
commit | b87520cd051656e14f59112793d66c259ffd4f52 (patch) | |
tree | d05fc3ff905800886f21e31cfce3310be6ebf1a9 /gcc/ada/mlib-tgt-irix.adb | |
parent | 0556b702920f8de9acfdff66e27c2e0155c41365 (diff) | |
download | gcc-b87520cd051656e14f59112793d66c259ffd4f52.tar.gz |
mlib-tgt-tru64.adb, [...] (Build_Dynamic_Library): Remove all auto-initialization code...
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
From-SVN: r101573
Diffstat (limited to 'gcc/ada/mlib-tgt-irix.adb')
-rw-r--r-- | gcc/ada/mlib-tgt-irix.adb | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/gcc/ada/mlib-tgt-irix.adb b/gcc/ada/mlib-tgt-irix.adb index 3baa39a45d5..7a77bff7493 100644 --- a/gcc/ada/mlib-tgt-irix.adb +++ b/gcc/ada/mlib-tgt-irix.adb @@ -40,21 +40,6 @@ with System; package body MLib.Tgt is - 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 -- --------------------- @@ -122,6 +107,7 @@ package body MLib.Tgt is pragma Unreferenced (Afiles); pragma Unreferenced (Interfaces); pragma Unreferenced (Symbol_Data); + pragma Unreferenced (Auto_Init); Lib_File : constant String := Lib_Dir & Directory_Separator & "lib" & @@ -130,8 +116,6 @@ package body MLib.Tgt is Version_Arg : String_Access; Symbolic_Link_Needed : Boolean := False; - Init_Fini : Argument_List_Access := Empty_Argument_List; - N_Options : Argument_List := Options; Options_Last : Natural := N_Options'Last; -- After moving -lxxx to Options_2, N_Options up to index Options_Last @@ -148,14 +132,6 @@ package body MLib.Tgt is Write_Line (Lib_File); end if; - -- 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; - -- Move all -lxxx to Options_2 declare @@ -192,8 +168,7 @@ package body MLib.Tgt is MLib.Utl.Gcc (Output_File => Lib_File, Objects => Ofiles, - Options => N_Options (N_Options'First .. Options_Last) & - Init_Fini.all, + Options => N_Options (N_Options'First .. Options_Last), Driver_Name => Driver_Name, Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); @@ -205,7 +180,7 @@ package body MLib.Tgt is (Output_File => Lib_Version, Objects => Ofiles, Options => N_Options (N_Options'First .. Options_Last) & - Version_Arg & Init_Fini.all, + Version_Arg, Driver_Name => Driver_Name, Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); Symbolic_Link_Needed := Lib_Version /= Lib_File; @@ -215,7 +190,7 @@ package body MLib.Tgt is (Output_File => Lib_Dir & Directory_Separator & Lib_Version, Objects => Ofiles, Options => N_Options (N_Options'First .. Options_Last) & - Version_Arg & Init_Fini.all, + Version_Arg, Driver_Name => Driver_Name, Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); Symbolic_Link_Needed := |