fix build on powerpc64 by providing the definition of SIGSEGV_FAULT_STACKPOINTER

with naddy@
This commit is contained in:
jasper 2021-09-10 18:44:55 +00:00
parent b05cd25e7b
commit 3368674a22
2 changed files with 23 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.39 2021/08/17 15:12:07 naddy Exp $
# $OpenBSD: Makefile,v 1.40 2021/09/10 18:44:55 jasper Exp $
COMMENT= GNU versions of grep pattern matching utilities
DISTNAME= grep-3.7
PKGNAME= g${DISTNAME}
REVISION = 0
CATEGORIES= sysutils
HOMEPAGE= https://www.gnu.org/software/grep/grep.html

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-lib_sigsegv_c,v 1.1 2021/09/10 18:44:55 jasper Exp $
Index: lib/sigsegv.c
--- lib/sigsegv.c.orig
+++ lib/sigsegv.c
@@ -511,7 +511,14 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
# define SIGSEGV_FAULT_STACKPOINTER scp->sc_regs[29]
-# elif defined __powerpc__ || defined __powerpc64__
+# elif defined(__powerpc64__)
+
+/* See the definition of 'struct sigcontext' and 'struct trapframe' in
+ openbsd-src/sys/arch/powerpc64/include/signal.h. */
+
+# define SIGSEGV_FAULT_STACKPOINTER scp->sc_sp
+
+# elif defined __powerpc__
/* See the definition of 'struct sigcontext' and 'struct trapframe' in
openbsd-src/sys/arch/powerpc/include/signal.h. */