[vlc-commits] bin: win32: Link vlc.exe and vlc-cache-gen.exe with -static

Martin Storsjö git at videolan.org
Thu Sep 13 12:28:20 CEST 2018


vlc | branch: master | Martin Storsjö <martin at martin.st> | Wed Sep 12 13:25:38 2018 +0300| [9edf62844f9af6b9fd645fcf16e3725fd13d814a] | committer: Martin Storsjö

bin: win32: Link vlc.exe and vlc-cache-gen.exe with -static

This prevents these executables from linking to a shared
libssp-0.dll if both a static and shared version is available
of this library.

Since these refer to the dynamically linked libvlc via libvlc.la,
it will still pick up the correct shared version of those, instead
of refusing to link to a dynamic library (as it does for any
library specified via -l<name>).

The same use of -Wc,-static is present in a few other Makefile.am
already.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9edf62844f9af6b9fd645fcf16e3725fd13d814a
---

 bin/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/Makefile.am b/bin/Makefile.am
index 51464d419b..6766004cf7 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -31,7 +31,7 @@ vlc_LDADD += $(LIBDL)
 else
 vlc_SOURCES = winvlc.c
 vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
-vlc_LDFLAGS = -mwindows
+vlc_LDFLAGS = -mwindows -Wc,-static
 vlc_LDADD += vlc_win32_rc.$(OBJEXT)
 libbreakpad_wrapper_la_SOURCES = breakpad.cpp
 libbreakpad_wrapper_la_LIBADD = $(BREAKPAD_LIBS)
@@ -118,6 +118,7 @@ vlc_cache_gen_LDADD = \
 	../lib/libvlc.la
 if HAVE_WIN32
 vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
+vlc_cache_gen_LDFLAGS = -Wc,-static
 vlc_cache_gen_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
 endif
 



More information about the vlc-commits mailing list