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:40:55 +0100
commit5d060725e706476751b0bda8e6d9f3670aa4b7de (patch)
treeb0a3176e35dc2ec43b9d3e8a3535cc8c2cc928a2 /meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch
parentd152dfe784f231fa369d59f9bce8195ad09c5482 (diff)
downloadopenembedded-core-5d060725e706476751b0bda8e6d9f3670aa4b7de.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 ] 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 @@
+Fixes for the Meson build of libtraceevent:
+
+- Make the plugin directory the same as the Makefiles
+- Install the plugins as modules not static and versioned shared libraries
+- Add an option to disable building the documentation (needs asciidoc and xmlto)
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/meson.build b/meson.build
+index b61c873..4bba4d8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir'))
+ libdir = join_paths(prefixdir, get_option('libdir'))
+ plugindir = get_option('plugindir')
+ if plugindir == ''
+- plugindir = join_paths(libdir, 'libtraceevent/plugins')
++ plugindir = join_paths(libdir, 'traceevent/plugins')
+ endif
+
+ add_project_arguments(
+@@ -45,10 +45,13 @@ if cunit_dep.found()
+ subdir('utest')
+ endif
+ subdir('samples')
+-subdir('Documentation')
+
+-custom_target(
+- 'docs',
+- output: 'docs',
+- depends: [html, man],
+- command: ['echo'])
++if get_option('docs')
++ subdir('Documentation')
++
++ custom_target(
++ 'docs',
++ output: 'docs',
++ depends: [html, man],
++ command: ['echo'])
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+index b2294f6..0611216 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,6 +4,10 @@
+
+ option('plugindir', type : 'string',
+ description : 'set the plugin dir')
++
++option('docs', type : 'boolean', value: true,
++ description : 'build documentation')
++
+ option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc',
+ description : 'directory for HTML documentation')
+ option('asciidoctor', type : 'boolean', value: false,
+diff --git a/plugins/meson.build b/plugins/meson.build
+index 74ad664..4919be4 100644
+--- a/plugins/meson.build
++++ b/plugins/meson.build
+@@ -19,11 +19,10 @@ plugins = [
+
+ pdeps = []
+ foreach plugin : plugins
+- pdeps += library(
++ pdeps += shared_module(
+ plugin.replace('.c', ''),
+ plugin,
+ name_prefix: '',
+- version: library_version,
+ dependencies: [libtraceevent_dep],
+ include_directories: [incdir],
+ install: true,