Comments
Patch
===================================================================
@@ -7,7 +7,7 @@
-- --
-- B o d y --
-- --
+-- Copyright (C) 2002-2010, Free Software Foundation, 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- --
@@ -61,8 +61,10 @@ package body MLib.Tgt.Specific is
function PIC_Option return String;
- No_Argument_List : constant String_List := (1 .. 0 => null);
- -- Used as value of parameter Options or Options2 in calls to Gcc
+ Shared_Libgcc : aliased String := "-shared-libgcc";
+
+ Shared_Libgcc_Switch : constant Argument_List :=
+ (1 => Shared_Libgcc'Access);
---------------------------
-- Build_Dynamic_Library --
@@ -99,7 +101,7 @@ package body MLib.Tgt.Specific is
Tools.Gcc
(Output_File => Lib_File,
Objects => Ofiles,
- Options => No_Argument_List,
+ Options => Shared_Libgcc_Switch,
Options_2 => Options,
Driver_Name => Driver_Name);
end Build_Dynamic_Library;
===================================================================
@@ -2561,11 +2561,13 @@ gnatlib-shared-win32:
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
$(RM) $(RTSDIR)/libgna*$(soext)
- cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc \
+ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
- cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc \
+ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \