Commit 51004cb5 by Vincent Celier Committed by Arnaud Charlet

mlib-tgt-tru64.adb, [...] (Build_Dynamic_Library): New parameter Options_2.

2004-10-04  Vincent Celier  <celier@gnat.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-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb,
	mlib-tgt-vxworks.adb, mlib-tgt.adb (Build_Dynamic_Library): New
	parameter Options_2.

	* mlib-prj.ads, mlib-prj.adb (Build_Library): Call
	Build_Dynamic_Library with an empty Options_2.

	* mlib-utl.ads, mlib-utl.adb (Gcc): Parameter Options_2 has no
	default anymore.

	* makegpr.adb (Get_Imported_Directories.add): Remove trailing
	directory separator, if any.
	(Gprmake): Do not allow mains on the command line for library projects.
	Do not attempt to link when the project is a library project.
	(Library_Opts): New table to store Library_Options.
	(Build_Library): If Library_Options is specified, pass these options
	when building a shared library.

From-SVN: r88490
parent 3b37ffbf
2004-10-04 Vincent Celier <celier@gnat.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-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb,
mlib-tgt-vxworks.adb, mlib-tgt.adb (Build_Dynamic_Library): New
parameter Options_2.
* mlib-prj.ads, mlib-prj.adb (Build_Library): Call
Build_Dynamic_Library with an empty Options_2.
* mlib-utl.ads, mlib-utl.adb (Gcc): Parameter Options_2 has no
default anymore.
* makegpr.adb (Get_Imported_Directories.add): Remove trailing
directory separator, if any.
(Gprmake): Do not allow mains on the command line for library projects.
Do not attempt to link when the project is a library project.
(Library_Opts): New table to store Library_Options.
(Build_Library): If Library_Options is specified, pass these options
when building a shared library.
2004-10-04 Jose Ruiz <ruiz@act-europe.fr> 2004-10-04 Jose Ruiz <ruiz@act-europe.fr>
* s-tposen.adb (Service_Entry): The object must be always unlocked at * s-tposen.adb (Service_Entry): The object must be always unlocked at
......
...@@ -65,7 +65,7 @@ package body Makegpr is ...@@ -65,7 +65,7 @@ package body Makegpr is
-- The name of a linking script, built one the fly, when there are C++ -- The name of a linking script, built one the fly, when there are C++
-- sources and the C++ compiler is not g++. -- sources and the C++ compiler is not g++.
No_Argument : constant Argument_List := (1 .. 0 => null); No_Argument : aliased Argument_List := (1 .. 0 => null);
-- Null argument list representing case of no arguments -- Null argument list representing case of no arguments
FD : Process_Descriptor; FD : Process_Descriptor;
...@@ -184,6 +184,15 @@ package body Makegpr is ...@@ -184,6 +184,15 @@ package body Makegpr is
Table_Name => "Makegpr.Linker_Options"); Table_Name => "Makegpr.Linker_Options");
-- Table to store the linking options -- Table to store the linking options
package Library_Opts is new Table.Table
(Table_Component_Type => String_Access,
Table_Index_Type => Integer,
Table_Low_Bound => 1,
Table_Initial => 20,
Table_Increment => 100,
Table_Name => "Makegpr.Library_Opts");
-- Table to store the linking options
package Ada_Mains is new Table.Table package Ada_Mains is new Table.Table
(Table_Component_Type => String_Access, (Table_Component_Type => String_Access,
Table_Index_Type => Integer, Table_Index_Type => Integer,
...@@ -1339,6 +1348,7 @@ package body Makegpr is ...@@ -1339,6 +1348,7 @@ package body Makegpr is
Time_Stamp : Time_Stamp_Type; Time_Stamp : Time_Stamp_Type;
Driver_Name : Name_Id := No_Name; Driver_Name : Name_Id := No_Name;
Lib_Opts : Argument_List_Access := No_Argument'Unrestricted_Access;
begin begin
Check_Archive_Builder; Check_Archive_Builder;
...@@ -1571,11 +1581,47 @@ package body Makegpr is ...@@ -1571,11 +1581,47 @@ package body Makegpr is
end if; end if;
end if; end if;
-- If Library_Options is specified, add these options
declare
Library_Options : constant Variable_Value :=
Value_Of
(Name_Library_Options,
Data.Decl.Attributes);
begin
if not Library_Options.Default then
declare
Current : String_List_Id := Library_Options.Values;
Element : String_Element;
begin
while Current /= Nil_String loop
Element := String_Elements.Table (Current);
Get_Name_String (Element.Value);
if Name_Len /= 0 then
Library_Opts.Increment_Last;
Library_Opts.Table (Library_Opts.Last) :=
new String'(Name_Buffer (1 .. Name_Len));
end if;
Current := Element.Next;
end loop;
end;
end if;
Lib_Opts :=
new Argument_List'(Argument_List
(Library_Opts.Table (1 .. Library_Opts.Last)));
end;
MLib.Tgt.Build_Dynamic_Library MLib.Tgt.Build_Dynamic_Library
(Ofiles => Arguments (1 .. Last_Argument), (Ofiles => Arguments (1 .. Last_Argument),
Foreign => Arguments (1 .. Last_Argument), Foreign => Arguments (1 .. Last_Argument),
Afiles => No_Argument, Afiles => No_Argument,
Options => No_Argument, Options => No_Argument,
Options_2 => Lib_Opts.all,
Interfaces => No_Argument, Interfaces => No_Argument,
Lib_Filename => Get_Name_String (Data.Library_Name), Lib_Filename => Get_Name_String (Data.Library_Name),
Lib_Dir => Get_Name_String (Data.Library_Dir), Lib_Dir => Get_Name_String (Data.Library_Dir),
...@@ -2827,6 +2873,15 @@ package body Makegpr is ...@@ -2827,6 +2873,15 @@ package body Makegpr is
Get_Name_String (Element.Value); Get_Name_String (Element.Value);
if Name_Len > 0 then if Name_Len > 0 then
-- Remove a trailing directory separator: this may cause
-- problems on Windows.
if Name_Len > 1
and then Name_Buffer (Name_Len) = Directory_Separator
then
Name_Len := Name_Len - 1;
end if;
declare declare
Arg : constant String := Arg : constant String :=
"-I" & Name_Buffer (1 .. Name_Len); "-I" & Name_Buffer (1 .. Name_Len);
...@@ -3002,32 +3057,44 @@ package body Makegpr is ...@@ -3002,32 +3057,44 @@ package body Makegpr is
end if; end if;
else else
-- First check for C++, to link libraries with g++, rather than gcc declare
Data : constant Prj.Project_Data := Projects.Table (Main_Project);
begin
if Data.Library and then Mains.Number_Of_Mains /= 0 then
Osint.Fail
("Cannot specify mains on the command line " &
"for a Library Project");
end if;
Check_For_C_Plus_Plus; -- First check for C++, to link libraries with g++,
-- rather than gcc.
-- Compile sources and build archives for library project, Check_For_C_Plus_Plus;
-- if necessary.
Compile_Sources; -- Compile sources and build archives for library project,
-- if necessary.
-- When Keep_Going is True, if we had some errors, fail now, Compile_Sources;
-- reporting the number of compilation errors.
-- Do not attempt to link.
Report_Total_Errors ("compilation"); -- When Keep_Going is True, if we had some errors, fail now,
-- reporting the number of compilation errors.
-- Do not attempt to link.
-- If -c was not specified, link the executables, if there are any. Report_Total_Errors ("compilation");
if not Compile_Only then -- If -c was not specified, link the executables,
Build_Global_Archive; -- if there are any.
Link_Executables;
end if;
-- When Keep_Going is True, if we had some errors, fail, reporting if not Compile_Only and then not Data.Library then
-- the number of linking errors. Build_Global_Archive;
Link_Executables;
end if;
-- When Keep_Going is True, if we had some errors, fail, reporting
-- the number of linking errors.
Report_Total_Errors ("linking"); Report_Total_Errors ("linking");
end;
end if; end if;
end Gprmake; end Gprmake;
......
...@@ -1465,6 +1465,7 @@ package body MLib.Prj is ...@@ -1465,6 +1465,7 @@ package body MLib.Prj is
Foreign => Foreign_Objects.all, Foreign => Foreign_Objects.all,
Afiles => Ali_Files.all, Afiles => Ali_Files.all,
Options => Options.all, Options => Options.all,
Options_2 => No_Argument_List,
Interfaces => Arguments (1 .. Argument_Number), Interfaces => Arguments (1 .. Argument_Number),
Lib_Filename => Lib_Filename.all, Lib_Filename => Lib_Filename.all,
Lib_Dir => Lib_Dirpath.all, Lib_Dir => Lib_Dirpath.all,
......
...@@ -69,7 +69,7 @@ package body MLib.Tgt is ...@@ -69,7 +69,7 @@ package body MLib.Tgt is
-- The switches to use when linking a library against libgnarl when using -- The switches to use when linking a library against libgnarl when using
-- FSU threads. -- FSU threads.
Thread_Options : Argument_List_Access := null; Thread_Options : Argument_List_Access := Empty_Argument_List;
-- Designate the thread switches to used when linking a library against -- Designate the thread switches to used when linking a library against
-- libgnarl. Depends on the thread library (Native or FSU). Resolved for -- libgnarl. Depends on the thread library (Native or FSU). Resolved for
-- the first library linked against libgnarl. -- the first library linked against libgnarl.
...@@ -119,6 +119,7 @@ package body MLib.Tgt is ...@@ -119,6 +119,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -142,8 +143,8 @@ package body MLib.Tgt is ...@@ -142,8 +143,8 @@ package body MLib.Tgt is
-- The switch for automatic initialization of Stand-Alone Libraries. -- The switch for automatic initialization of Stand-Alone Libraries.
-- Changed to a real switch when Auto_Init is True. -- Changed to a real switch when Auto_Init is True.
Options_2 : Argument_List_Access := Empty_Argument_List; Thread_Opts : Argument_List_Access := Empty_Argument_List;
-- Changed to the thread options, if -lgnarl is specified -- Set to Thread_Options if -lgnarl is found in the Options
begin begin
if Opt.Verbose_Mode then if Opt.Verbose_Mode then
...@@ -203,7 +204,7 @@ package body MLib.Tgt is ...@@ -203,7 +204,7 @@ package body MLib.Tgt is
end; end;
end if; end if;
Options_2 := Thread_Options; Thread_Opts := Thread_Options;
exit; exit;
end if; end if;
end loop; end loop;
...@@ -211,11 +212,11 @@ package body MLib.Tgt is ...@@ -211,11 +212,11 @@ package body MLib.Tgt is
-- Finally, call GCC (or the driver specified) to build the library -- Finally, call GCC (or the driver specified) to build the library
MLib.Utl.Gcc MLib.Utl.Gcc
(Output_File => Lib_File, (Output_File => Lib_File,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Bexpall_Option & Init_Fini.all, Options => Options & Bexpall_Option & Init_Fini.all,
Driver_Name => Driver_Name, Driver_Name => Driver_Name,
Options_2 => Options_2.all); Options_2 => Options_2 & Thread_Opts.all);
end Build_Dynamic_Library; end Build_Dynamic_Library;
------------- -------------
......
...@@ -99,6 +99,7 @@ package body MLib.Tgt is ...@@ -99,6 +99,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -147,6 +148,7 @@ package body MLib.Tgt is ...@@ -147,6 +148,7 @@ package body MLib.Tgt is
(Output_File => Lib_File, (Output_File => Lib_File,
Objects => Ofiles, Objects => Ofiles,
Options => Common_Options & Init_Fini.all, Options => Common_Options & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
else else
...@@ -157,6 +159,7 @@ package body MLib.Tgt is ...@@ -157,6 +159,7 @@ package body MLib.Tgt is
(Output_File => Lib_Version, (Output_File => Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Common_Options & Version_Arg & Init_Fini.all, Options => Common_Options & Version_Arg & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File; Symbolic_Link_Needed := Lib_Version /= Lib_File;
...@@ -165,6 +168,7 @@ package body MLib.Tgt is ...@@ -165,6 +168,7 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version, (Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Common_Options & Version_Arg & Init_Fini.all, Options => Common_Options & Version_Arg & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File; Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
......
...@@ -100,6 +100,7 @@ package body MLib.Tgt is ...@@ -100,6 +100,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -127,10 +128,10 @@ package body MLib.Tgt is ...@@ -127,10 +128,10 @@ package body MLib.Tgt is
-- After moving -lxxx to Options_2, N_Options up to index Options_Last -- After moving -lxxx to Options_2, N_Options up to index Options_Last
-- will contain the Options to pass to MLib.Utl.Gcc. -- will contain the Options to pass to MLib.Utl.Gcc.
Options_2 : Argument_List (Options'Range); Real_Options_2 : Argument_List (1 .. Options'Length + Options_2'Length);
Options_2_Last : Natural := Options_2'First - 1; Real_Options_2_Last : Natural := 0;
-- Options_2 up to index Options_2_Last will contain the Options_2 to -- Real_Options_2 up to index Real_Options_2_Last will contain the
-- pass to MLib.Utl.Gcc. -- Options_2 to pass to MLib.Utl.Gcc.
begin begin
if Opt.Verbose_Mode then if Opt.Verbose_Mode then
...@@ -159,8 +160,8 @@ package body MLib.Tgt is ...@@ -159,8 +160,8 @@ package body MLib.Tgt is
if Arg'Length > 2 if Arg'Length > 2
and then Arg (Arg'First .. Arg'First + 1) = "-l" and then Arg (Arg'First .. Arg'First + 1) = "-l"
then then
Options_2_Last := Options_2_Last + 1; Real_Options_2_Last := Real_Options_2_Last + 1;
Options_2 (Options_2_Last) := Arg; Real_Options_2 (Real_Options_2_Last) := Arg;
N_Options (Index .. Options_Last - 1) := N_Options (Index .. Options_Last - 1) :=
N_Options (Index + 1 .. Options_Last); N_Options (Index + 1 .. Options_Last);
Options_Last := Options_Last - 1; Options_Last := Options_Last - 1;
...@@ -171,6 +172,13 @@ package body MLib.Tgt is ...@@ -171,6 +172,13 @@ package body MLib.Tgt is
end loop; end loop;
end; end;
-- Add to Real_Options_2 the argument Options_2
Real_Options_2
(Real_Options_2_Last + 1 .. Real_Options_2_Last + Options_2'Length) :=
Options_2;
Real_Options_2_Last := Real_Options_2_Last + Options_2'Length;
if Lib_Version = "" then if Lib_Version = "" then
MLib.Utl.Gcc MLib.Utl.Gcc
(Output_File => Lib_File, (Output_File => Lib_File,
...@@ -178,7 +186,7 @@ package body MLib.Tgt is ...@@ -178,7 +186,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) & Options => N_Options (N_Options'First .. Options_Last) &
Init_Fini.all, Init_Fini.all,
Driver_Name => Driver_Name, Driver_Name => Driver_Name,
Options_2 => Options_2 (Options_2'First .. Options_2_Last)); Options_2 => Real_Options_2 (1 .. Real_Options_2_Last));
else else
Version_Arg := new String'("-Wl,-soname," & Lib_Version); Version_Arg := new String'("-Wl,-soname," & Lib_Version);
...@@ -190,7 +198,7 @@ package body MLib.Tgt is ...@@ -190,7 +198,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) & Options => N_Options (N_Options'First .. Options_Last) &
Version_Arg & Init_Fini.all, Version_Arg & Init_Fini.all,
Driver_Name => Driver_Name, Driver_Name => Driver_Name,
Options_2 => Options_2 (Options_2'First .. Options_2_Last)); Options_2 => Real_Options_2 (1 .. Real_Options_2_Last));
Symbolic_Link_Needed := Lib_Version /= Lib_File; Symbolic_Link_Needed := Lib_Version /= Lib_File;
else else
...@@ -200,7 +208,7 @@ package body MLib.Tgt is ...@@ -200,7 +208,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) & Options => N_Options (N_Options'First .. Options_Last) &
Version_Arg & Init_Fini.all, Version_Arg & Init_Fini.all,
Driver_Name => Driver_Name, Driver_Name => Driver_Name,
Options_2 => Options_2 (Options_2'First .. Options_2_Last)); Options_2 => Real_Options_2 (1 .. Real_Options_2_Last));
Symbolic_Link_Needed := Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File; Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
end if; end if;
......
...@@ -103,6 +103,7 @@ package body MLib.Tgt is ...@@ -103,6 +103,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -144,7 +145,8 @@ package body MLib.Tgt is ...@@ -144,7 +145,8 @@ package body MLib.Tgt is
(Output_File => Lib_File, (Output_File => Lib_File,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Init_Fini.all, Options => Options & Init_Fini.all,
Driver_Name => Driver_Name); Driver_Name => Driver_Name,
Options_2 => Options_2);
else else
Version_Arg := new String'("-Wl,-soname," & Lib_Version); Version_Arg := new String'("-Wl,-soname," & Lib_Version);
...@@ -154,7 +156,8 @@ package body MLib.Tgt is ...@@ -154,7 +156,8 @@ package body MLib.Tgt is
(Output_File => Lib_Version, (Output_File => Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all, Options => Options & Version_Arg & Init_Fini.all,
Driver_Name => Driver_Name); Driver_Name => Driver_Name,
Options_2 => Options_2);
Symbolic_Link_Needed := Lib_Version /= Lib_File; Symbolic_Link_Needed := Lib_Version /= Lib_File;
else else
...@@ -162,7 +165,8 @@ package body MLib.Tgt is ...@@ -162,7 +165,8 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version, (Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all, Options => Options & Version_Arg & Init_Fini.all,
Driver_Name => Driver_Name); Driver_Name => Driver_Name,
Options_2 => Options_2);
Symbolic_Link_Needed := Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File; Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
end if; end if;
......
...@@ -91,6 +91,7 @@ package body MLib.Tgt is ...@@ -91,6 +91,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -122,7 +123,7 @@ package body MLib.Tgt is ...@@ -122,7 +123,7 @@ package body MLib.Tgt is
(Output_File => Lib_File, (Output_File => Lib_File,
Objects => Ofiles, Objects => Ofiles,
Options => Tools.No_Argument_List, Options => Tools.No_Argument_List,
Options_2 => Options, Options_2 => Options & Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
end Build_Dynamic_Library; end Build_Dynamic_Library;
......
...@@ -97,6 +97,7 @@ package body MLib.Tgt is ...@@ -97,6 +97,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -140,6 +141,7 @@ package body MLib.Tgt is ...@@ -140,6 +141,7 @@ package body MLib.Tgt is
(Output_File => Lib_File, (Output_File => Lib_File,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Init_Fini.all, Options => Options & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
else else
...@@ -150,6 +152,7 @@ package body MLib.Tgt is ...@@ -150,6 +152,7 @@ package body MLib.Tgt is
(Output_File => Lib_Version, (Output_File => Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all, Options => Options & Version_Arg & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File; Symbolic_Link_Needed := Lib_Version /= Lib_File;
...@@ -158,6 +161,7 @@ package body MLib.Tgt is ...@@ -158,6 +161,7 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version, (Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles, Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all, Options => Options & Version_Arg & Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File; Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
......
...@@ -105,6 +105,7 @@ package body MLib.Tgt is ...@@ -105,6 +105,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -149,6 +150,7 @@ package body MLib.Tgt is ...@@ -149,6 +150,7 @@ package body MLib.Tgt is
Options & Options &
Expect_Unresolved'Access & Expect_Unresolved'Access &
Init_Fini.all, Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
else else
...@@ -163,6 +165,7 @@ package body MLib.Tgt is ...@@ -163,6 +165,7 @@ package body MLib.Tgt is
Version_Arg & Version_Arg &
Expect_Unresolved'Access & Expect_Unresolved'Access &
Init_Fini.all, Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File; Symbolic_Link_Needed := Lib_Version /= Lib_File;
...@@ -175,6 +178,7 @@ package body MLib.Tgt is ...@@ -175,6 +178,7 @@ package body MLib.Tgt is
Version_Arg & Version_Arg &
Expect_Unresolved'Access & Expect_Unresolved'Access &
Init_Fini.all, Init_Fini.all,
Options_2 => Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
Symbolic_Link_Needed := Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File; Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
......
...@@ -127,6 +127,7 @@ package body MLib.Tgt is ...@@ -127,6 +127,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -499,7 +500,7 @@ package body MLib.Tgt is ...@@ -499,7 +500,7 @@ package body MLib.Tgt is
Options => VMS_Options, Options => VMS_Options,
Options_2 => Link_With_Shared_Libgcc.all & Options_2 => Link_With_Shared_Libgcc.all &
Opts (Opts'First .. Last_Opt) & Opts (Opts'First .. Last_Opt) &
Opts2 (Opts2'First .. Last_Opt2), Opts2 (Opts2'First .. Last_Opt2) & Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
-- The auto-init object file need to be deleted, so that it will not -- The auto-init object file need to be deleted, so that it will not
......
...@@ -127,6 +127,7 @@ package body MLib.Tgt is ...@@ -127,6 +127,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -532,7 +533,7 @@ package body MLib.Tgt is ...@@ -532,7 +533,7 @@ package body MLib.Tgt is
Options => VMS_Options, Options => VMS_Options,
Options_2 => Link_With_Shared_Libgcc.all & Options_2 => Link_With_Shared_Libgcc.all &
Opts (Opts'First .. Last_Opt) & Opts (Opts'First .. Last_Opt) &
Opts2 (Opts2'First .. Last_Opt2), Opts2 (Opts2'First .. Last_Opt2) & Options_2,
Driver_Name => Driver_Name); Driver_Name => Driver_Name);
-- The auto-init object file need to be deleted, so that it will not -- The auto-init object file need to be deleted, so that it will not
......
...@@ -90,6 +90,7 @@ package body MLib.Tgt is ...@@ -90,6 +90,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -102,6 +103,7 @@ package body MLib.Tgt is ...@@ -102,6 +103,7 @@ package body MLib.Tgt is
pragma Unreferenced (Foreign); pragma Unreferenced (Foreign);
pragma Unreferenced (Afiles); pragma Unreferenced (Afiles);
pragma Unreferenced (Options); pragma Unreferenced (Options);
pragma Unreferenced (Options_2);
pragma Unreferenced (Interfaces); pragma Unreferenced (Interfaces);
pragma Unreferenced (Lib_Filename); pragma Unreferenced (Lib_Filename);
pragma Unreferenced (Lib_Dir); pragma Unreferenced (Lib_Dir);
......
...@@ -76,6 +76,7 @@ package body MLib.Tgt is ...@@ -76,6 +76,7 @@ package body MLib.Tgt is
Foreign : Argument_List; Foreign : Argument_List;
Afiles : Argument_List; Afiles : Argument_List;
Options : Argument_List; Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List; Interfaces : Argument_List;
Lib_Filename : String; Lib_Filename : String;
Lib_Dir : String; Lib_Dir : String;
...@@ -88,6 +89,7 @@ package body MLib.Tgt is ...@@ -88,6 +89,7 @@ package body MLib.Tgt is
pragma Unreferenced (Foreign); pragma Unreferenced (Foreign);
pragma Unreferenced (Afiles); pragma Unreferenced (Afiles);
pragma Unreferenced (Options); pragma Unreferenced (Options);
pragma Unreferenced (Options_2);
pragma Unreferenced (Interfaces); pragma Unreferenced (Interfaces);
pragma Unreferenced (Lib_Filename); pragma Unreferenced (Lib_Filename);
pragma Unreferenced (Lib_Dir); pragma Unreferenced (Lib_Dir);
......
...@@ -156,8 +156,8 @@ package body MLib.Utl is ...@@ -156,8 +156,8 @@ package body MLib.Utl is
(Output_File : String; (Output_File : String;
Objects : Argument_List; Objects : Argument_List;
Options : Argument_List; Options : Argument_List;
Driver_Name : Name_Id := No_Name; Options_2 : Argument_List;
Options_2 : Argument_List := No_Argument_List) Driver_Name : Name_Id := No_Name)
is is
Arguments : Arguments :
OS_Lib.Argument_List OS_Lib.Argument_List
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2003, Ada Core Technologies, Inc -- -- Copyright (C) 2001-2004, Ada Core Technologies, Inc --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -40,8 +40,8 @@ package MLib.Utl is ...@@ -40,8 +40,8 @@ package MLib.Utl is
(Output_File : String; (Output_File : String;
Objects : Argument_List; Objects : Argument_List;
Options : Argument_List; Options : Argument_List;
Driver_Name : Name_Id := No_Name; Options_2 : Argument_List;
Options_2 : Argument_List := No_Argument_List); Driver_Name : Name_Id := No_Name);
-- Driver_Name indicates the "driver" to invoke; by default, the "driver" -- Driver_Name indicates the "driver" to invoke; by default, the "driver"
-- is gcc. -- is gcc.
-- This procedure invokes the driver to create a shared library. -- This procedure invokes the driver to create a shared library.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment