All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libunwind: Fix build on aarch64/musl
@ 2020-06-04 16:12 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2020-06-04 16:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

Although this patch should be applied irrespective of libc but
kept it musl specific to avoid extra testing.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../libunwind/libunwind/sigset_t.patch        | 29 +++++++++++++++++++
 .../libunwind/libunwind_1.4.0.bb              |  5 +++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libunwind/libunwind/sigset_t.patch

diff --git a/meta/recipes-support/libunwind/libunwind/sigset_t.patch b/meta/recipes-support/libunwind/libunwind/sigset_t.patch
new file mode 100644
index 0000000000..4fb7744cdf
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/sigset_t.patch
@@ -0,0 +1,29 @@
+Do no use __sigset_t which is in private libc namespace
+replace it with sigset_t, This also makes it portable
+to musl.
+
+Fixes
+
+../../libunwind-1.4.0/include/libunwind-aarch64.h:195:2: error: unknown type name '__sigset_t'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/include/libunwind-aarch64.h
++++ b/include/libunwind-aarch64.h
+@@ -34,6 +34,7 @@ extern "C" {
+ #include <inttypes.h>
+ #include <stddef.h>
+ #include <ucontext.h>
++#include <signal.h>
+ 
+ #define UNW_TARGET      aarch64
+ #define UNW_TARGET_AARCH64      1
+@@ -192,7 +193,7 @@ typedef struct
+ 	unsigned long uc_flags;
+ 	struct ucontext *uc_link;
+ 	stack_t uc_stack;
+-	__sigset_t uc_sigmask;
++	sigset_t uc_sigmask;
+ 	struct unw_sigcontext uc_mcontext;
+   } unw_tdep_context_t;
+ 
diff --git a/meta/recipes-support/libunwind/libunwind_1.4.0.bb b/meta/recipes-support/libunwind/libunwind_1.4.0.bb
index f50205f1b9..f9036326d5 100644
--- a/meta/recipes-support/libunwind/libunwind_1.4.0.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.4.0.bb
@@ -8,7 +8,10 @@ SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV
            file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
            file://0006-Fix-for-X32.patch \
            "
-SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+SRC_URI_append_libc-musl = "\
+           file://musl-header-conflict.patch \
+           file://sigset_t.patch \                   
+           "
 
 SRC_URI[md5sum] = "5114504c74ac3992ac06aa551cd55678"
 SRC_URI[sha256sum] = "df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-04 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-04 16:12 [PATCH] libunwind: Fix build on aarch64/musl Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.