summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:53:52 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:53:52 +0000
commitafe3500db9a086e780e254e0b1eb180deb289c8e (patch)
tree82ff6cb4ad487fb3197b3201c544213d8c85879f
parent77829d1e7df88427a4a6280ddf62390aacae955b (diff)
downloadgcc-afe3500db9a086e780e254e0b1eb180deb289c8e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88490 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog22
-rw-r--r--gcc/ada/makegpr.adb103
-rw-r--r--gcc/ada/mlib-prj.adb1
-rw-r--r--gcc/ada/mlib-tgt-aix.adb19
-rw-r--r--gcc/ada/mlib-tgt-hpux.adb4
-rw-r--r--gcc/ada/mlib-tgt-irix.adb26
-rw-r--r--gcc/ada/mlib-tgt-linux.adb10
-rw-r--r--gcc/ada/mlib-tgt-mingw.adb3
-rw-r--r--gcc/ada/mlib-tgt-solaris.adb4
-rw-r--r--gcc/ada/mlib-tgt-tru64.adb4
-rw-r--r--gcc/ada/mlib-tgt-vms-alpha.adb3
-rw-r--r--gcc/ada/mlib-tgt-vms-ia64.adb3
-rw-r--r--gcc/ada/mlib-tgt-vxworks.adb2
-rw-r--r--gcc/ada/mlib-tgt.adb2
-rw-r--r--gcc/ada/mlib-utl.adb4
-rw-r--r--gcc/ada/mlib-utl.ads6
16 files changed, 169 insertions, 47 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 898395faa6a..463a4d3e498 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,25 @@
+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>
* s-tposen.adb (Service_Entry): The object must be always unlocked at
diff --git a/gcc/ada/makegpr.adb b/gcc/ada/makegpr.adb
index 6b51b328639..30f15199307 100644
--- a/gcc/ada/makegpr.adb
+++ b/gcc/ada/makegpr.adb
@@ -65,7 +65,7 @@ package body Makegpr is
-- The name of a linking script, built one the fly, when there are C++
-- 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
FD : Process_Descriptor;
@@ -184,6 +184,15 @@ package body Makegpr is
Table_Name => "Makegpr.Linker_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
(Table_Component_Type => String_Access,
Table_Index_Type => Integer,
@@ -1339,6 +1348,7 @@ package body Makegpr is
Time_Stamp : Time_Stamp_Type;
Driver_Name : Name_Id := No_Name;
+ Lib_Opts : Argument_List_Access := No_Argument'Unrestricted_Access;
begin
Check_Archive_Builder;
@@ -1571,11 +1581,47 @@ package body Makegpr is
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
(Ofiles => Arguments (1 .. Last_Argument),
Foreign => Arguments (1 .. Last_Argument),
Afiles => No_Argument,
Options => No_Argument,
+ Options_2 => Lib_Opts.all,
Interfaces => No_Argument,
Lib_Filename => Get_Name_String (Data.Library_Name),
Lib_Dir => Get_Name_String (Data.Library_Dir),
@@ -2827,6 +2873,15 @@ package body Makegpr is
Get_Name_String (Element.Value);
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
Arg : constant String :=
"-I" & Name_Buffer (1 .. Name_Len);
@@ -3002,32 +3057,44 @@ package body Makegpr is
end if;
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,
- -- if necessary.
+ Check_For_C_Plus_Plus;
- Compile_Sources;
+ -- Compile sources and build archives for library project,
+ -- if necessary.
- -- When Keep_Going is True, if we had some errors, fail now,
- -- reporting the number of compilation errors.
- -- Do not attempt to link.
+ Compile_Sources;
- 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
- Build_Global_Archive;
- Link_Executables;
- end if;
+ -- If -c was not specified, link the executables,
+ -- if there are any.
- -- When Keep_Going is True, if we had some errors, fail, reporting
- -- the number of linking errors.
+ if not Compile_Only and then not Data.Library then
+ 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 Gprmake;
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index 8ff9b87599f..1bfe6b175bd 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -1465,6 +1465,7 @@ package body MLib.Prj is
Foreign => Foreign_Objects.all,
Afiles => Ali_Files.all,
Options => Options.all,
+ Options_2 => No_Argument_List,
Interfaces => Arguments (1 .. Argument_Number),
Lib_Filename => Lib_Filename.all,
Lib_Dir => Lib_Dirpath.all,
diff --git a/gcc/ada/mlib-tgt-aix.adb b/gcc/ada/mlib-tgt-aix.adb
index fc5a954da56..a0afe879750 100644
--- a/gcc/ada/mlib-tgt-aix.adb
+++ b/gcc/ada/mlib-tgt-aix.adb
@@ -69,7 +69,7 @@ package body MLib.Tgt is
-- The switches to use when linking a library against libgnarl when using
-- 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
-- libgnarl. Depends on the thread library (Native or FSU). Resolved for
-- the first library linked against libgnarl.
@@ -119,6 +119,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -142,8 +143,8 @@ package body MLib.Tgt is
-- The switch for automatic initialization of Stand-Alone Libraries.
-- Changed to a real switch when Auto_Init is True.
- Options_2 : Argument_List_Access := Empty_Argument_List;
- -- Changed to the thread options, if -lgnarl is specified
+ Thread_Opts : Argument_List_Access := Empty_Argument_List;
+ -- Set to Thread_Options if -lgnarl is found in the Options
begin
if Opt.Verbose_Mode then
@@ -203,7 +204,7 @@ package body MLib.Tgt is
end;
end if;
- Options_2 := Thread_Options;
+ Thread_Opts := Thread_Options;
exit;
end if;
end loop;
@@ -211,11 +212,11 @@ package body MLib.Tgt is
-- Finally, call GCC (or the driver specified) to build the library
MLib.Utl.Gcc
- (Output_File => Lib_File,
- Objects => Ofiles,
- Options => Options & Bexpall_Option & Init_Fini.all,
- Driver_Name => Driver_Name,
- Options_2 => Options_2.all);
+ (Output_File => Lib_File,
+ Objects => Ofiles,
+ Options => Options & Bexpall_Option & Init_Fini.all,
+ Driver_Name => Driver_Name,
+ Options_2 => Options_2 & Thread_Opts.all);
end Build_Dynamic_Library;
-------------
diff --git a/gcc/ada/mlib-tgt-hpux.adb b/gcc/ada/mlib-tgt-hpux.adb
index 4198f22317c..a438b762f6e 100644
--- a/gcc/ada/mlib-tgt-hpux.adb
+++ b/gcc/ada/mlib-tgt-hpux.adb
@@ -99,6 +99,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -147,6 +148,7 @@ package body MLib.Tgt is
(Output_File => Lib_File,
Objects => Ofiles,
Options => Common_Options & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
else
@@ -157,6 +159,7 @@ package body MLib.Tgt is
(Output_File => Lib_Version,
Objects => Ofiles,
Options => Common_Options & Version_Arg & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File;
@@ -165,6 +168,7 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles,
Options => Common_Options & Version_Arg & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
diff --git a/gcc/ada/mlib-tgt-irix.adb b/gcc/ada/mlib-tgt-irix.adb
index 6429eae4e15..25fc1c13e15 100644
--- a/gcc/ada/mlib-tgt-irix.adb
+++ b/gcc/ada/mlib-tgt-irix.adb
@@ -100,6 +100,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -127,10 +128,10 @@ package body MLib.Tgt is
-- After moving -lxxx to Options_2, N_Options up to index Options_Last
-- will contain the Options to pass to MLib.Utl.Gcc.
- Options_2 : Argument_List (Options'Range);
- Options_2_Last : Natural := Options_2'First - 1;
- -- Options_2 up to index Options_2_Last will contain the Options_2 to
- -- pass to MLib.Utl.Gcc.
+ Real_Options_2 : Argument_List (1 .. Options'Length + Options_2'Length);
+ Real_Options_2_Last : Natural := 0;
+ -- Real_Options_2 up to index Real_Options_2_Last will contain the
+ -- Options_2 to pass to MLib.Utl.Gcc.
begin
if Opt.Verbose_Mode then
@@ -159,8 +160,8 @@ package body MLib.Tgt is
if Arg'Length > 2
and then Arg (Arg'First .. Arg'First + 1) = "-l"
then
- Options_2_Last := Options_2_Last + 1;
- Options_2 (Options_2_Last) := Arg;
+ Real_Options_2_Last := Real_Options_2_Last + 1;
+ Real_Options_2 (Real_Options_2_Last) := Arg;
N_Options (Index .. Options_Last - 1) :=
N_Options (Index + 1 .. Options_Last);
Options_Last := Options_Last - 1;
@@ -171,6 +172,13 @@ package body MLib.Tgt is
end loop;
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
MLib.Utl.Gcc
(Output_File => Lib_File,
@@ -178,7 +186,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) &
Init_Fini.all,
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
Version_Arg := new String'("-Wl,-soname," & Lib_Version);
@@ -190,7 +198,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) &
Version_Arg & Init_Fini.all,
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;
else
@@ -200,7 +208,7 @@ package body MLib.Tgt is
Options => N_Options (N_Options'First .. Options_Last) &
Version_Arg & Init_Fini.all,
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_Dir & Directory_Separator & Lib_Version /= Lib_File;
end if;
diff --git a/gcc/ada/mlib-tgt-linux.adb b/gcc/ada/mlib-tgt-linux.adb
index a4a0ce8617a..a3b82a4cda6 100644
--- a/gcc/ada/mlib-tgt-linux.adb
+++ b/gcc/ada/mlib-tgt-linux.adb
@@ -103,6 +103,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -144,7 +145,8 @@ package body MLib.Tgt is
(Output_File => Lib_File,
Objects => Ofiles,
Options => Options & Init_Fini.all,
- Driver_Name => Driver_Name);
+ Driver_Name => Driver_Name,
+ Options_2 => Options_2);
else
Version_Arg := new String'("-Wl,-soname," & Lib_Version);
@@ -154,7 +156,8 @@ package body MLib.Tgt is
(Output_File => Lib_Version,
Objects => Ofiles,
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;
else
@@ -162,7 +165,8 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all,
- Driver_Name => Driver_Name);
+ Driver_Name => Driver_Name,
+ Options_2 => Options_2);
Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
end if;
diff --git a/gcc/ada/mlib-tgt-mingw.adb b/gcc/ada/mlib-tgt-mingw.adb
index 1efebfd5638..0dddb89a6bd 100644
--- a/gcc/ada/mlib-tgt-mingw.adb
+++ b/gcc/ada/mlib-tgt-mingw.adb
@@ -91,6 +91,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -122,7 +123,7 @@ package body MLib.Tgt is
(Output_File => Lib_File,
Objects => Ofiles,
Options => Tools.No_Argument_List,
- Options_2 => Options,
+ Options_2 => Options & Options_2,
Driver_Name => Driver_Name);
end Build_Dynamic_Library;
diff --git a/gcc/ada/mlib-tgt-solaris.adb b/gcc/ada/mlib-tgt-solaris.adb
index a307e85ae88..4052debc4fc 100644
--- a/gcc/ada/mlib-tgt-solaris.adb
+++ b/gcc/ada/mlib-tgt-solaris.adb
@@ -97,6 +97,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -140,6 +141,7 @@ package body MLib.Tgt is
(Output_File => Lib_File,
Objects => Ofiles,
Options => Options & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
else
@@ -150,6 +152,7 @@ package body MLib.Tgt is
(Output_File => Lib_Version,
Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File;
@@ -158,6 +161,7 @@ package body MLib.Tgt is
(Output_File => Lib_Dir & Directory_Separator & Lib_Version,
Objects => Ofiles,
Options => Options & Version_Arg & Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
diff --git a/gcc/ada/mlib-tgt-tru64.adb b/gcc/ada/mlib-tgt-tru64.adb
index e40fe50e8d0..89be1edac38 100644
--- a/gcc/ada/mlib-tgt-tru64.adb
+++ b/gcc/ada/mlib-tgt-tru64.adb
@@ -105,6 +105,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -149,6 +150,7 @@ package body MLib.Tgt is
Options &
Expect_Unresolved'Access &
Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
else
@@ -163,6 +165,7 @@ package body MLib.Tgt is
Version_Arg &
Expect_Unresolved'Access &
Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed := Lib_Version /= Lib_File;
@@ -175,6 +178,7 @@ package body MLib.Tgt is
Version_Arg &
Expect_Unresolved'Access &
Init_Fini.all,
+ Options_2 => Options_2,
Driver_Name => Driver_Name);
Symbolic_Link_Needed :=
Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
diff --git a/gcc/ada/mlib-tgt-vms-alpha.adb b/gcc/ada/mlib-tgt-vms-alpha.adb
index 6f1f069eb40..07f06cf59e0 100644
--- a/gcc/ada/mlib-tgt-vms-alpha.adb
+++ b/gcc/ada/mlib-tgt-vms-alpha.adb
@@ -127,6 +127,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -499,7 +500,7 @@ package body MLib.Tgt is
Options => VMS_Options,
Options_2 => Link_With_Shared_Libgcc.all &
Opts (Opts'First .. Last_Opt) &
- Opts2 (Opts2'First .. Last_Opt2),
+ Opts2 (Opts2'First .. Last_Opt2) & Options_2,
Driver_Name => Driver_Name);
-- The auto-init object file need to be deleted, so that it will not
diff --git a/gcc/ada/mlib-tgt-vms-ia64.adb b/gcc/ada/mlib-tgt-vms-ia64.adb
index 639ebca3f84..c4bd0703932 100644
--- a/gcc/ada/mlib-tgt-vms-ia64.adb
+++ b/gcc/ada/mlib-tgt-vms-ia64.adb
@@ -127,6 +127,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -532,7 +533,7 @@ package body MLib.Tgt is
Options => VMS_Options,
Options_2 => Link_With_Shared_Libgcc.all &
Opts (Opts'First .. Last_Opt) &
- Opts2 (Opts2'First .. Last_Opt2),
+ Opts2 (Opts2'First .. Last_Opt2) & Options_2,
Driver_Name => Driver_Name);
-- The auto-init object file need to be deleted, so that it will not
diff --git a/gcc/ada/mlib-tgt-vxworks.adb b/gcc/ada/mlib-tgt-vxworks.adb
index 6eaa882b924..a304b51a4ab 100644
--- a/gcc/ada/mlib-tgt-vxworks.adb
+++ b/gcc/ada/mlib-tgt-vxworks.adb
@@ -90,6 +90,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -102,6 +103,7 @@ package body MLib.Tgt is
pragma Unreferenced (Foreign);
pragma Unreferenced (Afiles);
pragma Unreferenced (Options);
+ pragma Unreferenced (Options_2);
pragma Unreferenced (Interfaces);
pragma Unreferenced (Lib_Filename);
pragma Unreferenced (Lib_Dir);
diff --git a/gcc/ada/mlib-tgt.adb b/gcc/ada/mlib-tgt.adb
index c18dec8caf1..a31adbd95bb 100644
--- a/gcc/ada/mlib-tgt.adb
+++ b/gcc/ada/mlib-tgt.adb
@@ -76,6 +76,7 @@ package body MLib.Tgt is
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
+ Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -88,6 +89,7 @@ package body MLib.Tgt is
pragma Unreferenced (Foreign);
pragma Unreferenced (Afiles);
pragma Unreferenced (Options);
+ pragma Unreferenced (Options_2);
pragma Unreferenced (Interfaces);
pragma Unreferenced (Lib_Filename);
pragma Unreferenced (Lib_Dir);
diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb
index 328d5a506e8..f61386af3cc 100644
--- a/gcc/ada/mlib-utl.adb
+++ b/gcc/ada/mlib-utl.adb
@@ -156,8 +156,8 @@ package body MLib.Utl is
(Output_File : String;
Objects : Argument_List;
Options : Argument_List;
- Driver_Name : Name_Id := No_Name;
- Options_2 : Argument_List := No_Argument_List)
+ Options_2 : Argument_List;
+ Driver_Name : Name_Id := No_Name)
is
Arguments :
OS_Lib.Argument_List
diff --git a/gcc/ada/mlib-utl.ads b/gcc/ada/mlib-utl.ads
index b2d8da85892..87612db4fad 100644
--- a/gcc/ada/mlib-utl.ads
+++ b/gcc/ada/mlib-utl.ads
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -40,8 +40,8 @@ package MLib.Utl is
(Output_File : String;
Objects : Argument_List;
Options : Argument_List;
- Driver_Name : Name_Id := No_Name;
- Options_2 : Argument_List := No_Argument_List);
+ Options_2 : Argument_List;
+ Driver_Name : Name_Id := No_Name);
-- Driver_Name indicates the "driver" to invoke; by default, the "driver"
-- is gcc.
-- This procedure invokes the driver to create a shared library.