From 42b58e873a9d91c3a1f2665a01a56525f44313d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 19 Oct 2008 17:10:11 +0300 Subject: [PATCH 1/1] Do not link plugins against libvlccore explicitly We really want plugins to resolve their VLC symbols against the already loaded LibVLC core, rather than with their own version of it. Performance benefit should be neglectible, if any. Still, this will "fix" the plugin crash with static LibVLC builds (or generate a due link-time error). Anyway, this is one step toward supporting any form of static linking again. --- modules/common.am | 8 ++++++-- src/vlc-plugin.pc.in | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/common.am b/modules/common.am index 3762a2b480..ec9783e3f1 100644 --- a/modules/common.am +++ b/modules/common.am @@ -18,11 +18,15 @@ AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@` AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@` AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@` AM_LDFLAGS = -rpath '$(libvlcdir)' \ - -avoid-version -module -no-undefined \ + -avoid-version -module \ -export-symbol-regex ^vlc_entry \ -shrext $(LIBEXT) \ `$(VLC_CONFIG) --ldflags plugin $@` -AM_LIBADD = `$(VLC_CONFIG) -libs plugin $@` $(LTLIBVLCCORE) +AM_LIBADD = `$(VLC_CONFIG) -libs plugin $@` +if HAVE_WIN32 +# Windows does not support undefined symbols +AM_LIBADD += $(LTLIBVLCCORE) +endif include $(srcdir)/Modules.am diff --git a/src/vlc-plugin.pc.in b/src/vlc-plugin.pc.in index f5ccf62d15..4e698e905c 100644 --- a/src/vlc-plugin.pc.in +++ b/src/vlc-plugin.pc.in @@ -13,4 +13,5 @@ Cflags: -I${includedir} -I${includedir}/vlc/plugins \ @DEFS_BIGENDIAN@ \ -D_REENTRANT \ -D_THREAD_SAFE -Libs: -L${libdir} -lvlccore +# Plugins should link against an _already_ loaded LibVLC. +#Libs: -L${libdir} -lvlccore -- 2.39.2