summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-25 13:54:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-29 15:58:38 +0100
commit59b55dd8cf87d5657061da32cec3506bb83ca1b0 (patch)
treee61e29f9bb26e01ce3a0a5adef2a84a427c9d664 /meta/recipes-extended
parent2115602f898f915c8e20358b5523da10d3b611f3 (diff)
downloadopenembedded-core-59b55dd8cf87d5657061da32cec3506bb83ca1b0.tar.gz
grep: Fix build on ppc/musl
Backport a patch from libsigsegv Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/grep/grep/0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch32
-rw-r--r--meta/recipes-extended/grep/grep_3.7.bb4
2 files changed, 35 insertions, 1 deletions
diff --git a/meta/recipes-extended/grep/grep/0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch b/meta/recipes-extended/grep/grep/0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch
new file mode 100644
index 0000000000..d8283d31b1
--- /dev/null
+++ b/meta/recipes-extended/grep/grep/0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch
@@ -0,0 +1,32 @@
+From 981385237834bdf3e468421147eece68d9bfc7e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 25 Mar 2022 13:34:26 -0700
+Subject: [PATCH] mcontext is not a standard layout so glibc and musl differ
+
+This is already applied to libsigsegv upstream, hopefully next version
+of grep will update its internal copy and we can drop this patch
+
+Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=libsigsegv.git;a=commitdiff;h=a6ff69873110c0a8ba6f7fd90532dbc11224828c]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/sigsegv.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/sigsegv.c b/lib/sigsegv.c
+index 998c827..b6f4841 100644
+--- a/lib/sigsegv.c
++++ b/lib/sigsegv.c
+@@ -219,8 +219,8 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1]
+ # else /* 32-bit */
+ /* both should be equivalent */
+-# if 0
+-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
++# if ! defined __GLIBC__
++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_regs->gregs[1]
+ # else
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
+ # endif
+--
+2.35.1
+
diff --git a/meta/recipes-extended/grep/grep_3.7.bb b/meta/recipes-extended/grep/grep_3.7.bb
index 40390c25d9..7005cbe164 100644
--- a/meta/recipes-extended/grep/grep_3.7.bb
+++ b/meta/recipes-extended/grep/grep_3.7.bb
@@ -6,7 +6,9 @@ SECTION = "console/utils"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
+ file://0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch \
+ "
SRC_URI[sha256sum] = "5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c"