summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-09-07 01:41:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-10 12:13:06 +0100
commit91098772f8718c3538a49524177bf42d3a667a5e (patch)
tree5c0c57fa7b4e0a3645070e3d87f459e751e17fcc
parentdb3071d825fb0f4bdbfbf6cc9a7f381970bcb966 (diff)
downloadpoky-91098772f8718c3538a49524177bf42d3a667a5e.tar.gz
sysprof: fix build with musl
(From OE-Core rev: d2dc07ebc9e38a7936c942b7c89caa67b654c587) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/sysprof/files/wordsize.patch38
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_3.30.0.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-kernel/sysprof/files/wordsize.patch b/meta/recipes-kernel/sysprof/files/wordsize.patch
new file mode 100644
index 0000000000..d65b13a682
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/wordsize.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/5]
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From bc7e3e27c28d0bab8bea72f2314191532b2e7840 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Fri, 7 Sep 2018 01:30:09 +0100
7Subject: [PATCH] capture: use size of void* instead of glibc-specific
8 __WORDSIZE
9
10__WORDSIZE is glibc-specific so sp-capture-types.h doesn't work with musl.
11---
12 lib/capture/sp-capture-types.h | 6 ++++--
13 1 file changed, 4 insertions(+), 2 deletions(-)
14
15diff --git a/lib/capture/sp-capture-types.h b/lib/capture/sp-capture-types.h
16index 48fcfb8..1d6cd1d 100644
17--- a/lib/capture/sp-capture-types.h
18+++ b/lib/capture/sp-capture-types.h
19@@ -32,12 +32,14 @@ G_BEGIN_DECLS
20 #define SP_CAPTURE_MAGIC (GUINT32_TO_LE(0xFDCA975E))
21 #define SP_CAPTURE_ALIGN (sizeof(SpCaptureAddress))
22
23-#if __WORDSIZE == 64
24+#if GLIB_SIZEOF_VOID_P == 8
25 # define SP_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE000000000000000)
26 # define SP_CAPTURE_ADDRESS_FORMAT "0x%016lx"
27-#else
28+#elif GLIB_SIZEOF_VOID_P == 4
29 # define SP_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE0000000)
30 # define SP_CAPTURE_ADDRESS_FORMAT "0x%016llx"
31+#else
32+#error Unknown GLIB_SIZEOF_VOID_P
33 #endif
34
35 #define SP_CAPTURE_CURRENT_TIME (sp_clock_get_current_time())
36--
372.11.0
38
diff --git a/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb b/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb
index 4f1b75017d..7783ab27f5 100644
--- a/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb
@@ -14,6 +14,7 @@ SRC_URI[archive.sha256sum] = "29cd2c4be277f00698dce48259219557c4fddc2c01254b8fac
14SRC_URI += " \ 14SRC_URI += " \
15 file://define-NT_GNU_BUILD_ID.patch \ 15 file://define-NT_GNU_BUILD_ID.patch \
16 file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \ 16 file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
17 file://wordsize.patch \
17 " 18 "
18RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://bugzilla.gnome.org/show_bug.cgi?id=794625" 19RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://bugzilla.gnome.org/show_bug.cgi?id=794625"
19 20