]> git.sesse.net Git - vlc/commitdiff
Do not link plugins against libvlccore explicitly
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 19 Oct 2008 14:10:11 +0000 (17:10 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 19 Oct 2008 14:10:11 +0000 (17:10 +0300)
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
src/vlc-plugin.pc.in

index 3762a2b4802b2f2cd938bebec1bbce81fc3f4b83..ec9783e3f19d0c3454f65dcdf6316d677ca7f314 100644 (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
 
index f5ccf62d15348e321b74b76087d51f60780855b0..4e698e905c93fd0a3788b203cfd8afe5e060a194 100644 (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