[vlc-devel] [PATCH 3.0 12/16] bin: win32: Link vlc.exe and vlc-cache-gen.exe with -static
Martin Storsjö
martin at martin.st
Fri Jun 19 23:27:03 CEST 2020
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.
(cherry picked from commit 9edf62844f9af6b9fd645fcf16e3725fd13d814a)
---
bin/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 2877e8b0ea..257a065797 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
--
2.17.1
More information about the vlc-devel
mailing list