summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@mips.inka.de>2021-09-11 13:51:13 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-09-11 13:51:13 -0700
commitaa35e17ac6d4749c017eea4b1920903277ce3f69 (patch)
treecf65b4a3c193af06f0fcad0c033604e8d80c6b7e
parentb6bae60d83eda6b168368fa40f42ade9dfc86df0 (diff)
downloadgnulib-aa35e17ac6d4749c017eea4b1920903277ce3f69.tar.gz
sigsegv: port to OpenBSD 6.8+ powerpc64
* lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Special case for __OpenBSD__ && __powerpc64__, needed due to: https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db which is part of the oldest currently-supported OpenBSD (6.8), so we needn’t worry about older versions.
-rw-r--r--ChangeLog9
-rw-r--r--lib/sigsegv.c9
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a7fd469f49..b9795d6581 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-09-11 Christian Weisgerber <naddy@mips.inka.de> (tiny change)
+
+ sigsegv: port to OpenBSD 6.8+ powerpc64
+ * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER):
+ Special case for __OpenBSD__ && __powerpc64__, needed due to:
+ https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db
+ which is part of the oldest currently-supported OpenBSD (6.8),
+ so we needn’t worry about older versions.
+
2021-09-09 Pádraig Brady <P@draigBrady.com>
maintainer-makefile: add 'can' to sc_prohibit_doubled_word
diff --git a/lib/sigsegv.c b/lib/sigsegv.c
index 998c82768c..347b42644a 100644
--- a/lib/sigsegv.c
+++ b/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' 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. */