Commit 42b58e87 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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.
parent d859e6b9
...@@ -18,11 +18,15 @@ AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@` ...@@ -18,11 +18,15 @@ AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@`
AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@` AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@`
AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@` AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@`
AM_LDFLAGS = -rpath '$(libvlcdir)' \ AM_LDFLAGS = -rpath '$(libvlcdir)' \
-avoid-version -module -no-undefined \ -avoid-version -module \
-export-symbol-regex ^vlc_entry \ -export-symbol-regex ^vlc_entry \
-shrext $(LIBEXT) \ -shrext $(LIBEXT) \
`$(VLC_CONFIG) --ldflags plugin $@` `$(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 include $(srcdir)/Modules.am
......
...@@ -13,4 +13,5 @@ Cflags: -I${includedir} -I${includedir}/vlc/plugins \ ...@@ -13,4 +13,5 @@ Cflags: -I${includedir} -I${includedir}/vlc/plugins \
@DEFS_BIGENDIAN@ \ @DEFS_BIGENDIAN@ \
-D_REENTRANT \ -D_REENTRANT \
-D_THREAD_SAFE -D_THREAD_SAFE
Libs: -L${libdir} -lvlccore # Plugins should link against an _already_ loaded LibVLC.
#Libs: -L${libdir} -lvlccore
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment