summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-08-27 20:57:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-29 09:41:07 +0100
commit142b6921bde5b22bcd7e0e5e8d895575d0fb6c64 (patch)
treefbceaf3976727bdf3448714cdf3b781cbdd58c3a /meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch
parent6da9c2b29e9e22f67b01ed63ac59d9e0350d044f (diff)
downloadpoky-142b6921bde5b22bcd7e0e5e8d895575d0fb6c64.tar.gz
libtraceevent: build with Meson
After what I presume is the recent kernel upgrade, perf started to fail to configure. This was actually due to libtraceevent racing during its build and failing to put one of the .o files into the .so (reminder: Make is terrible). This doesn't cause the libtraceevent build to fail so once the broken .so is in sstate, it causes all future perf builds to fail. Instead of rewriting the Makefile rules to fix this race it's easier to switch to Meson which doesn't have this sort of problem. However the Meson support is pretty new and has some rough edges, so we need a patch to make it do the right thing. I will submit the libtraceevent fixes upstream shortly. [ YOCTO #15201 ] (From OE-Core rev: 5d060725e706476751b0bda8e6d9f3670aa4b7de) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch')
-rw-r--r--meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch b/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch
new file mode 100644
index 0000000000..38b6107136
--- /dev/null
+++ b/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch
@@ -0,0 +1,74 @@
1Fixes for the Meson build of libtraceevent:
2
3- Make the plugin directory the same as the Makefiles
4- Install the plugins as modules not static and versioned shared libraries
5- Add an option to disable building the documentation (needs asciidoc and xmlto)
6
7Upstream-Status: Pending
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9
10diff --git a/meson.build b/meson.build
11index b61c873..4bba4d8 100644
12--- a/meson.build
13+++ b/meson.build
14@@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir'))
15 libdir = join_paths(prefixdir, get_option('libdir'))
16 plugindir = get_option('plugindir')
17 if plugindir == ''
18- plugindir = join_paths(libdir, 'libtraceevent/plugins')
19+ plugindir = join_paths(libdir, 'traceevent/plugins')
20 endif
21
22 add_project_arguments(
23@@ -45,10 +45,13 @@ if cunit_dep.found()
24 subdir('utest')
25 endif
26 subdir('samples')
27-subdir('Documentation')
28
29-custom_target(
30- 'docs',
31- output: 'docs',
32- depends: [html, man],
33- command: ['echo'])
34+if get_option('docs')
35+ subdir('Documentation')
36+
37+ custom_target(
38+ 'docs',
39+ output: 'docs',
40+ depends: [html, man],
41+ command: ['echo'])
42+endif
43diff --git a/meson_options.txt b/meson_options.txt
44index b2294f6..0611216 100644
45--- a/meson_options.txt
46+++ b/meson_options.txt
47@@ -4,6 +4,10 @@
48
49 option('plugindir', type : 'string',
50 description : 'set the plugin dir')
51+
52+option('docs', type : 'boolean', value: true,
53+ description : 'build documentation')
54+
55 option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc',
56 description : 'directory for HTML documentation')
57 option('asciidoctor', type : 'boolean', value: false,
58diff --git a/plugins/meson.build b/plugins/meson.build
59index 74ad664..4919be4 100644
60--- a/plugins/meson.build
61+++ b/plugins/meson.build
62@@ -19,11 +19,10 @@ plugins = [
63
64 pdeps = []
65 foreach plugin : plugins
66- pdeps += library(
67+ pdeps += shared_module(
68 plugin.replace('.c', ''),
69 plugin,
70 name_prefix: '',
71- version: library_version,
72 dependencies: [libtraceevent_dep],
73 include_directories: [incdir],
74 install: true,