[vlc-devel] commit: Do not link plugins against libvlccore explicitly ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Oct 19 16:13:05 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct 19 17:10:11 2008 +0300| [42b58e873a9d91c3a1f2665a01a56525f44313d5] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42b58e873a9d91c3a1f2665a01a56525f44313d5
---

 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 3762a2b..ec9783e 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 f5ccf62..4e698e9 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




More information about the vlc-devel mailing list