From c4820158f5b080d4aadd9e0ec2ba0dc6377d7ca1 Mon Sep 17 00:00:00 2001 From: Nicolas Setton Date: Wed, 27 Oct 2004 14:27:53 +0200 Subject: mlib-tgt-darwin.adb: New file. 2004-10-26 Nicolas Setton * mlib-tgt-darwin.adb: New file. * 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-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb (Archive_Indexer_Options): New subprogram body. * Makefile.in: Add support for building shared libraries under Darwin. (EXTRA_GNATRTL_NONTASKING_OBJS, ppc-vxworks): Add s-vxwexc.o, containing the low level EH init subprogram to be called from __gnat_initialize. * mlib-tgt.ads, mlib-tgt.adb (Archive_Indexer_Options): New subprogram, indicates which options to pass to the archive indexer. * mlib-utl.adb: Add support for calling ranlib with additional options. This is needed for instance under Mac OS X. (Ranlib_Options): New global variable, used to store the potential options to pass to ranlib. (Ar): Use Ranlib_Options when spawning ranlib. (Initialize): Set the value of ranlib option. From-SVN: r89639 --- gcc/ada/mlib-utl.adb | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'gcc/ada/mlib-utl.adb') diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb index f61386a..4d21c2f 100644 --- a/gcc/ada/mlib-utl.adb +++ b/gcc/ada/mlib-utl.adb @@ -36,17 +36,18 @@ with GNAT; use GNAT; package body MLib.Utl is - Initialized : Boolean := False; + Initialized : Boolean := False; - Gcc_Name : constant String := "gcc"; - Gcc_Exec : OS_Lib.String_Access; + Gcc_Name : constant String := "gcc"; + Gcc_Exec : OS_Lib.String_Access; - Ar_Name : OS_Lib.String_Access; - Ar_Exec : OS_Lib.String_Access; - Ar_Options : OS_Lib.String_List_Access; + Ar_Name : OS_Lib.String_Access; + Ar_Exec : OS_Lib.String_Access; + Ar_Options : OS_Lib.String_List_Access; - Ranlib_Name : OS_Lib.String_Access; - Ranlib_Exec : OS_Lib.String_Access := null; + Ranlib_Name : OS_Lib.String_Access; + Ranlib_Exec : OS_Lib.String_Access := null; + Ranlib_Options : OS_Lib.String_List_Access := null; procedure Initialize; -- Look for the tools in the path and record the full path for each one @@ -116,7 +117,7 @@ package body MLib.Utl is OS_Lib.Spawn (Ranlib_Exec.all, - (1 => Arguments (Ar_Options'Length + 1)), + Ranlib_Options.all & (Arguments (Ar_Options'Length + 1)), Success); if not Success then @@ -284,6 +285,8 @@ package body MLib.Utl is Write_Line (Ranlib_Exec.all); end if; end if; + + Ranlib_Options := Archive_Indexer_Options; end if; end Initialize; -- cgit v1.1