bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* sigsegv.c: add OpenBSD/powerpc64 support
@ 2021-09-11 20:19 Christian Weisgerber
  2021-09-11 20:53 ` Paul Eggert
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Weisgerber @ 2021-09-11 20:19 UTC (permalink / raw)
  To: bug-gnulib

gnulib's sigsegv.c has support for OpenBSD on a number of architectures.
Currently, it treats powerpc64 the same as powerpc, but that is not
correct and will not compile.

Here's a patch to add powerp64 support:

diff b6bae60d83eda6b168368fa40f42ade9dfc86df0 /home/naddy/tmp/gnulib
blob - 998c82768cb6f7aa0a418551645c9910851ff9c8
file + lib/sigsegv.c
--- lib/sigsegv.c
+++ lib/sigsegv.c
@@ -511,8 +511,15 @@ 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.  */
 
-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-13 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 20:19 sigsegv.c: add OpenBSD/powerpc64 support Christian Weisgerber
2021-09-11 20:53 ` Paul Eggert
2021-09-11 22:42   ` Christian Weisgerber
2021-09-11 23:01   ` Bruno Haible
2021-09-13 19:37     ` Christian Weisgerber
2021-09-13 23:12       ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).