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

Martin Storsjö git at videolan.org
Sat Jun 20 21:29:47 CEST 2020


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Wed Sep 12 13:25:38 2018 +0300| [6fb84c969e465a9138f7c08c4aa680b4b9f449fa] | 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.

(cherry picked from commit 9edf62844f9af6b9fd645fcf16e3725fd13d814a)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6fb84c969e465a9138f7c08c4aa680b4b9f449fa
---

 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
 



More information about the vlc-commits mailing list