Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] sysprof: fix build with musl
@ 2018-09-07  1:00 Ross Burton
  2018-09-07  1:35 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2018-09-07  1:00 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-kernel/sysprof/files/wordsize.patch | 62 ++++++++++++++++++++++++
 meta/recipes-kernel/sysprof/sysprof_3.30.0.bb    |  1 +
 2 files changed, 63 insertions(+)
 create mode 100644 meta/recipes-kernel/sysprof/files/wordsize.patch

diff --git a/meta/recipes-kernel/sysprof/files/wordsize.patch b/meta/recipes-kernel/sysprof/files/wordsize.patch
new file mode 100644
index 00000000000..4ce77777825
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/wordsize.patch
@@ -0,0 +1,62 @@
+capture: use size of void* instead of glibc-specific __WORDSIZE
+
+__WORDSIZE is glibc-specific so sp-capture-types.h doesn't work with musl.
+
+As this code is all about the size of pointers, do sizeof(void*) at configure
+time and use that to determine what values to use.
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/5]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/config.h.meson b/config.h.meson
+index 2d8c8fb..d927b1b 100644
+--- a/config.h.meson
++++ b/config.h.meson
+@@ -34,3 +34,6 @@
+ 
+ /* Version number of package */
+ #mesondefine VERSION
++
++/* Size of a pointer */
++#mesondefine VOID_P_SIZE
+diff --git a/lib/capture/sp-capture-types.h b/lib/capture/sp-capture-types.h
+index 48fcfb8..bc3ab9c 100644
+--- a/lib/capture/sp-capture-types.h
++++ b/lib/capture/sp-capture-types.h
+@@ -19,6 +19,7 @@
+ #ifndef SP_CAPTURE_FORMAT_H
+ #define SP_CAPTURE_FORMAT_H
+ 
++#include <config.h>
+ #include <glib.h>
+ 
+ #ifdef SP_ENABLE_GOBJECT
+@@ -32,12 +33,14 @@ G_BEGIN_DECLS
+ #define SP_CAPTURE_MAGIC (GUINT32_TO_LE(0xFDCA975E))
+ #define SP_CAPTURE_ALIGN (sizeof(SpCaptureAddress))
+ 
+-#if __WORDSIZE == 64
++#if VOID_P_SIZE == 8
+ # define SP_CAPTURE_JITMAP_MARK    G_GUINT64_CONSTANT(0xE000000000000000)
+ # define SP_CAPTURE_ADDRESS_FORMAT "0x%016lx"
+-#else
++#elif VOID_P_SIZE == 4
+ # define SP_CAPTURE_JITMAP_MARK    G_GUINT64_CONSTANT(0xE0000000)
+ # define SP_CAPTURE_ADDRESS_FORMAT "0x%016llx"
++#else
++#error Unknown VOID_P_SIZE
+ #endif
+ 
+ #define SP_CAPTURE_CURRENT_TIME   (sp_clock_get_current_time())
+diff --git a/meson.build b/meson.build
+index ff7296b..d841c0d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -35,6 +35,7 @@ has_clockid = cc.has_member('struct perf_event_attr', 'clockid', prefix: '#inclu
+ if has_use_clockid and has_clockid
+   config_h.set10('HAVE_PERF_CLOCKID', true)
+ endif
++config_h.set('VOID_P_SIZE', cc.sizeof('void*'))
+ 
+ add_global_arguments([
+   '-DHAVE_CONFIG_H',
diff --git a/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb b/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb
index 4f1b75017d2..7783ab27f50 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
 SRC_URI += " \
            file://define-NT_GNU_BUILD_ID.patch \
            file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
+           file://wordsize.patch \
            "
 RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://bugzilla.gnome.org/show_bug.cgi?id=794625"
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for sysprof: fix build with musl
  2018-09-07  1:00 [PATCH] sysprof: fix build with musl Ross Burton
@ 2018-09-07  1:35 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-09-07  1:35 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

== Series Details ==

Series: sysprof: fix build with musl
Revision: 1
URL   : https://patchwork.openembedded.org/series/13947/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 0191456d81)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-07  1:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07  1:00 [PATCH] sysprof: fix build with musl Ross Burton
2018-09-07  1:35 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox