summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2012-02-21 21:56:55 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-23 11:29:08 +0000
commit5522c28c78c71443afab3cb38db82ea080e71010 (patch)
tree6f122999228dc89beb739d919a9b08c3f1bddd56
parent1fc97cba57211fa8075c08ed63d882950b0d9451 (diff)
Make libgabble-plugins.la a libtool convenience library on non-Windows, non-Androidmake-library-sane-46417
This avoids putting an unversioned shared library in the public library directory, which is discouraged. It also avoids crashes when linked with -Bsymbolic-functions (or -Bsymbolic), which result from having two copies of Wocky (one PIC/shared in libgabble-plugins.so, and one non-PIC/static in libgabble-convenience.la) which fight. -Bsymbolic-functions are the default on some Ubuntu releases, to reduce relocations. Without -Bsymbolic-functions, the non-PIC copy of Wocky in the executable takes precedence (the normal ELF ABI rules, which allow "interposing" symbols). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46417 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--src/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 9ab4a1566..fc514cc3f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -228,9 +228,18 @@ telepathy_gabble_LDFLAGS = -export-dynamic
noinst_LTLIBRARIES = libgabble-convenience.la
-lib_LTLIBRARIES = libgabble-plugins.la
+lib_LTLIBRARIES =
-libgabble_plugins_la_LDFLAGS = -shared -no-undefined -avoid-version
+libgabble_plugins_la_LDFLAGS = -no-undefined
+
+if WINDOWS
+lib_LTLIBRARIES += libgabble-plugins.la
+libgabble_plugins_la_LDFLAGS += -shared -avoid-version
+else
+# When Wocky and the Gabble plugin API are both stable, this can move
+# to $(libdir), with proper versioning.
+noinst_LTLIBRARIES += libgabble-plugins.la
+endif
libgabble_plugins_la_LIBADD = \
$(ALL_LIBS)