summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2025-08-21 12:58:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-25 17:47:21 +0100
commit672c55172d5f082d21663d32f32fbb0a43913627 (patch)
treeea7452086c3b750bdc40157ca989d76c9804f26a /meta/recipes-kernel
parentdae1dcaa8f9332af5dcd1085c8f0b361eb3663ae (diff)
downloadpoky-672c55172d5f082d21663d32f32fbb0a43913627.tar.gz
babeltrace2: don't install static modules
There's no point building or installing static plugins, so apply a patch to only build shared plugins. Poky passes --disable-static via no-static-libs.inc, but anyone building babeltrace2 with nodistro or another distro that doesn't use no-static-libs.inc will fail to build babeltrace2 because of packaging errors around the static version of the python plugin. (From OE-Core rev: cf5ef8a2b6f509c348b9cf800a8534a4e8702103) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/lttng/babeltrace2/0001-src-explicitly-only-build-shared-plugins.patch70
-rw-r--r--meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb2
2 files changed, 71 insertions, 1 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-src-explicitly-only-build-shared-plugins.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-src-explicitly-only-build-shared-plugins.patch
new file mode 100644
index 0000000000..7f8d5c7df3
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace2/0001-src-explicitly-only-build-shared-plugins.patch
@@ -0,0 +1,70 @@
1From 3f43a0554c73287973047b44ae5e196b7c995c60 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Thu, 21 Aug 2025 12:42:20 +0100
4Subject: [PATCH] src: explicitly only build shared plugins
5
6For some reason, libtool builds static libraries for libs which have
7been marked as modules. These are pointless: you can't dlopen() a static
8library.
9
10Avoid wasting compile time and disk space by passing -shared to libtool
11so that the static libraries are not built.
12
13Upstream-Status: Submitted [https://github.com/efficios/babeltrace/pull/121]
14Signed-off-by: Ross Burton <ross.burton@arm.com>
15---
16 src/Makefile.am | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
18
19diff --git a/src/Makefile.am b/src/Makefile.am
20index 0567131b..7aa46b20 100644
21--- a/src/Makefile.am
22+++ b/src/Makefile.am
23@@ -619,7 +619,7 @@ nodist_EXTRA_python_plugin_provider_babeltrace2_python_plugin_provider_la_SOURCE
24 python_plugin_provider_babeltrace2_python_plugin_provider_la_LDFLAGS = \
25 $(AM_LDFLAGS) \
26 $(LT_NO_UNDEFINED) \
27- -avoid-version -module \
28+ -avoid-version -module -shared \
29 $(PYTHON_LDFLAGS)
30
31 python_plugin_provider_babeltrace2_python_plugin_provider_la_CPPFLAGS = \
32@@ -669,7 +669,7 @@ plugins_utils_babeltrace_plugin_utils_la_SOURCES = \
33 plugins_utils_babeltrace_plugin_utils_la_LDFLAGS = \
34 $(AM_LDFLAGS) \
35 $(LT_NO_UNDEFINED) \
36- -avoid-version -module $(LD_NOTEXT)
37+ -avoid-version -module -shared $(LD_NOTEXT)
38
39 plugins_utils_babeltrace_plugin_utils_la_LIBADD = \
40 plugins/common/muxing/libmuxing.la
41@@ -775,7 +775,7 @@ plugins_ctf_babeltrace_plugin_ctf_la_SOURCES = \
42 plugins_ctf_babeltrace_plugin_ctf_la_LDFLAGS = \
43 $(AM_LDFLAGS) \
44 $(LT_NO_UNDEFINED) \
45- -avoid-version -module $(LD_NOTEXT)
46+ -avoid-version -module -shared $(LD_NOTEXT)
47
48 plugins_ctf_babeltrace_plugin_ctf_la_LIBADD = \
49 plugins/ctf/common/metadata/libctf-parser.la \
50@@ -816,7 +816,7 @@ plugins_text_babeltrace_plugin_text_la_SOURCES = \
51 plugins_text_babeltrace_plugin_text_la_LDFLAGS = \
52 $(AM_LDFLAGS) \
53 $(LT_NO_UNDEFINED) \
54- -avoid-version -module $(LD_NOTEXT)
55+ -avoid-version -module -shared $(LD_NOTEXT)
56
57 plugins_text_babeltrace_plugin_text_la_LIBADD =
58
59@@ -840,7 +840,7 @@ plugins_lttng_utils_babeltrace_plugin_lttng_utils_la_SOURCES = \
60 plugins_lttng_utils_babeltrace_plugin_lttng_utils_la_LDFLAGS = \
61 $(AM_LDFLAGS) \
62 $(LT_NO_UNDEFINED) \
63- -avoid-version -module $(LD_NOTEXT) \
64+ -avoid-version -module -shared $(LD_NOTEXT) \
65 $(ELFUTILS_LIBS)
66
67 plugins_lttng_utils_babeltrace_plugin_lttng_utils_la_LIBADD = \
68--
692.43.0
70
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb b/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
index 52768f6ce3..1dc8cd8a49 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.1;protocol=http
14 file://0001-tests-set-the-correct-plugin-directory.patch \ 14 file://0001-tests-set-the-correct-plugin-directory.patch \
15 file://0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch \ 15 file://0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch \
16 file://external-python-tests.patch \ 16 file://external-python-tests.patch \
17 file://0001-src-explicitly-only-build-shared-plugins.patch \
17 " 18 "
18SRCREV = "7f2f8cd6dac497cbb466efb31219b531c62013f5" 19SRCREV = "7f2f8cd6dac497cbb466efb31219b531c62013f5"
19UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$" 20UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
@@ -27,7 +28,6 @@ export DISTSETUPOPTS = " --install-lib=${PYTHON_SITEPACKAGES_DIR}"
27PACKAGECONFIG ??= "manpages" 28PACKAGECONFIG ??= "manpages"
28PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native" 29PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native"
29 30
30FILES:${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a"
31FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so ${PYTHON_SITEPACKAGES_DIR}/*" 31FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so ${PYTHON_SITEPACKAGES_DIR}/*"
32 32
33ASNEEDED = "" 33ASNEEDED = ""