[vlc-devel] [PATCH] [RFC] Win32: prefer the static libraries when creating the dlls

Jean-Baptiste Kempf jb at videolan.org
Sat Oct 11 18:00:45 CEST 2014


This should avoid the issues of packaging libgcc_s_sjlj-1.dll,
libwinpthread-1.dll and the like.

--
Fix suggested by Flameeyes
---
 lib/Makefile.am   | 3 ++-
 modules/common.am | 3 ++-
 src/Makefile.am   | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index e004b2e..32b8828 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -64,7 +64,8 @@ libvlc_la_LDFLAGS = \
 libvlc_la_DEPENDENCIES = libvlc.sym
 if HAVE_WIN32
 libvlc_la_DEPENDENCIES += ../src/libvlc_win32_rc.$(OBJEXT)
-libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version
+libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version \
+					 -Wc,--static -Wc,-static-libgcc
 endif
 
 pkgconfig_DATA = libvlc.pc
diff --git a/modules/common.am b/modules/common.am
index 9bb5143..c3b3f8e 100644
--- a/modules/common.am
+++ b/modules/common.am
@@ -33,7 +33,8 @@ AM_LDFLAGS = \
 	-no-undefined \
 	$(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE) 
 if HAVE_WIN32
-AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo
+AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo \
+              -Wc,--static -Wc,-static-libgcc
 endif
 
 SUFFIXES = .asm
diff --git a/src/Makefile.am b/src/Makefile.am
index 9111e73..8fdfab2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -190,7 +190,8 @@ libvlccore_la_LIBADD = $(LIBS_libvlccore) \
 libvlccore_la_DEPENDENCIES = libvlccore.sym
 if HAVE_WIN32
 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
-libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version
+libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version \
+						 -Wc,--static -Wc,-static-libgcc
 endif
 if HAVE_DBUS
 libvlccore_la_LIBADD += $(DBUS_LIBS)
-- 
2.1.2




More information about the vlc-devel mailing list