diff options
-rw-r--r-- | meta/recipes-devtools/m4/m4-1.4.19.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/m4/m4-1.4.19.inc b/meta/recipes-devtools/m4/m4-1.4.19.inc index 2785a3d22c..2adf4de6f2 100644 --- a/meta/recipes-devtools/m4/m4-1.4.19.inc +++ b/meta/recipes-devtools/m4/m4-1.4.19.inc | |||
@@ -8,6 +8,7 @@ inherit autotools texinfo ptest gettext | |||
8 | 8 | ||
9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ | 9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ |
10 | file://ac_config_links.patch \ | 10 | file://ac_config_links.patch \ |
11 | file://0001-sigsegv-Fix-build-on-ppc-musl.patch \ | ||
11 | " | 12 | " |
12 | SRC_URI:append:class-target = " file://run-ptest \ | 13 | SRC_URI:append:class-target = " file://run-ptest \ |
13 | file://serial-tests-config.patch \ | 14 | file://serial-tests-config.patch \ |
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 @@ | |||
1 | From 36d5e26f606e070553eb0fff1f738e61970be5d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Mar 2022 20:22:20 -0800 | ||
4 | Subject: [PATCH] sigsegv: Fix build on ppc/musl | ||
5 | |||
6 | mcontext is not a standard layout so glibc and musl differ sadly. | ||
7 | |||
8 | Fixes | ||
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 | |||
11 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | lib/sigsegv.c | 6 +++--- | ||
15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/lib/sigsegv.c b/lib/sigsegv.c | ||
18 | index 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 | -- | ||
36 | 2.35.1 | ||
37 | |||