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.
This commit is contained in:
Rémi Denis-Courmont 2008-10-19 17:10:11 +03:00
parent d859e6b953
commit 42b58e873a
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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