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

Steve Lhomme robux4 at ycbcr.xyz
Thu Sep 13 08:47:50 CEST 2018


LGTM because it's in if HAVE_WIN32 as done elsewhere for the core DLL 
and modules.


On 13/09/2018 08:31, Martin Storsjö wrote:
> 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.
> ---
>   bin/Makefile.am | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/bin/Makefile.am b/bin/Makefile.am
> index 51464d4..6766004 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.7.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list