OSDN Git Service

Avoid -shared-libgcc dependencies in optional DLLs.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 7 Mar 2017 22:17:57 +0000 (22:17 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 7 Mar 2017 22:17:57 +0000 (22:17 +0000)
mingwrt/ChangeLog
mingwrt/Makefile.in

index ca0f260..e7dbe78 100644 (file)
@@ -1,3 +1,11 @@
+2017-03-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Avoid -shared-libgcc dependencies in optional DLLs.
+
+       * Makefile.in (dllname): Qualify it, by addition of...
+       (LIBGCC_LINK_OPTION): ...this DLL name specific linking option macro.
+       (libmingwex.dll.a): Force it to use -static-libgcc for associated DLL.
+
 2017-02-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Support optional DLL builds from static libraries.
index 1b379a1..c6ad956 100644 (file)
@@ -719,13 +719,18 @@ DLLVERSION = "0:0:0"
        $(CC) $(call a2dll,tmp$<,$(call dllname,$*)) -L. -Wl,--out-implib=$@
        $(RM) tmp$<
 
-dllname = $1-$(dllsuffix).dll
+dllname = $1-$(dllsuffix).dll $(LIBGCC_LINK_OPTION)
 a2dll = -shared -o $2 -Wl,--whole-archive $1 -Wl,--no-whole-archive
 dllsuffix = `echo $(DLLVERSION) | awk -F: '{printf "%d",$$1-$$3}'`
 
 all-optional-dlls: all-mingwrt-optional-dlls
 all-mingwrt-optional-dlls: libmingwex.dll.a
 
+# In most optional DLL build cases, we should avoid creating any
+# unnecessary dependency on (known to be broken) -shared-libgcc
+#
+libmingwex.dll.a: LIBGCC_LINK_OPTION = -static-libgcc
+
 
 # Installation Rules
 # ------------------