summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/m4/m4
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-09 23:53:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-11 06:56:01 +0000
commit9ad40791fe66d4eb430d1b54b29d274d631e9433 (patch)
treecb769d260d8b6102dd99de75955f7b8694c13ac2 /meta/recipes-devtools/m4/m4
parent720eb2cc8dcfbc6c0cf652051cfb3d0fef04b366 (diff)
downloadpoky-9ad40791fe66d4eb430d1b54b29d274d631e9433.tar.gz
m4: Fix build on musl/ppc
(From OE-Core rev: 41ccf5b38506608032754beaff393f74e0403fd1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/m4/m4')
-rw-r--r--meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch b/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch
new file mode 100644
index 0000000000..04320de63a
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch
@@ -0,0 +1,37 @@
1From 36d5e26f606e070553eb0fff1f738e61970be5d7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Mar 2022 20:22:20 -0800
4Subject: [PATCH] sigsegv: Fix build on ppc/musl
5
6mcontext is not a standard layout so glibc and musl differ sadly.
7
8Fixes
9../../m4-1.4.19/lib/sigsegv.c: In function 'sigsegv_handler': ../../m4-1.4.19/lib/sigsegv.c:223:75: error: 'mcontext_t' has no member named 'uc_regs'; did you mean 'gregs'? 223 | # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] | ^~~~~~~
10
11Upstream-Status: Submitted [https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 lib/sigsegv.c | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/lib/sigsegv.c b/lib/sigsegv.c
18index 696a152..fa0c465 100644
19--- a/lib/sigsegv.c
20+++ b/lib/sigsegv.c
21@@ -217,10 +217,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
22 # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1]
23 # else /* 32-bit */
24 /* both should be equivalent */
25-# if 0
26-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
27+# if ! defined __GLIBC__
28+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_regs->gregs[1]
29 # else
30-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
31+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
32 # endif
33 # endif
34
35--
362.35.1
37