fix: undefined symbols for tracepoints in lgpl source
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 1 Dec 2020 16:02:41 +0000 (11:02 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 1 Dec 2020 22:34:55 +0000 (17:34 -0500)
Move the new internal 'urcu-ust' urcu flavor symbols to a separate
library named 'liblttng-ust-common.so' and link 'liblttng-ust.so' and
'liblttng-ust-tracepoint.so' on it.

Add this common library to the pkgconfig file which should handle the
transition for client code using it in its build system.

LGPL_SOURCE client code which doesn't use pkgconfig in its build system
will need to link with '-llttng-ust-common' instead of '-lurcu-bp' like
prior ust versions.

Change-Id: I807f997a2a94cb4f8d1bdf72002c1ae1b9fedf8d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/Makefile.am
lttng-ust.pc.in

index 2b25cfc5c2e58cbf8f0c491a6dfb5a688906868e..ca81ba6d4183e93cefa81d2f09dbf9e723ea5134 100644 (file)
@@ -2,7 +2,13 @@ AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing
 
 noinst_LTLIBRARIES = liblttng-ust-runtime.la liblttng-ust-support.la
 
-lib_LTLIBRARIES = liblttng-ust-tracepoint.la liblttng-ust.la
+lib_LTLIBRARIES = liblttng-ust-common.la liblttng-ust-tracepoint.la liblttng-ust.la
+
+liblttng_ust_common_la_SOURCES = \
+       lttng-ust-urcu.c \
+       lttng-ust-urcu-pointer.c
+
+liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
 
 liblttng_ust_tracepoint_la_SOURCES = \
        tracepoint.c \
@@ -10,11 +16,10 @@ liblttng_ust_tracepoint_la_SOURCES = \
        tracepoint-internal.h \
        lttng-tracer-core.h \
        jhash.h \
-       error.h \
-       lttng-ust-urcu.c \
-       lttng-ust-urcu-pointer.c
+       error.h
 
 liblttng_ust_tracepoint_la_LIBADD = \
+       liblttng-ust-common.la \
        $(top_builddir)/snprintf/libustsnprintf.la \
        $(DL_LIBS)
 
@@ -125,6 +130,7 @@ liblttng_ust_support_la_LIBADD = \
 
 liblttng_ust_la_LIBADD = \
        -lrt \
+       liblttng-ust-common.la \
        $(top_builddir)/snprintf/libustsnprintf.la \
        $(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
        liblttng-ust-tracepoint.la \
index 45d1a8d483ff62e5f122c897c2072a85f3c5de5f..6aee46ef1856b5cfdcb9f0915a0a02c208bde05b 100644 (file)
@@ -7,6 +7,6 @@ Name: LTTng Userspace Tracer
 Description: The LTTng Userspace Tracer (UST) is a library accompanied by a set of tools to trace userspace code. 
 Version: @PACKAGE_VERSION@
 Requires:
-Libs: -L${libdir} -llttng-ust -ldl
+Libs: -L${libdir} -llttng-ust -llttng-ust-common -ldl
 Cflags: -I${includedir} 
 
This page took 0.032102 seconds and 4 git commands to generate.