Source: libsigsegv
Version: 2.10-4
Severity: important
Tags: patch
Hello!
libsigsegv currently fails to build from source on sparc64:
make[3]: Entering directory '/«PKGBUILDDIR»/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-I. -I. -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -c -o handler.lo handler.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I. -D_FORTIFY_SOURCE=2 -g
-O2 -fstack-protector-strong -Wformat -Werror=format-security -c handler.c
-fPIC -DPIC -o .libs/handler.o
In file included from fault.h:37:0,
from handler-unix.c:71,
from handler.c:20:
handler-unix.c: In function 'sigsegv_handler':
fault-linux-sparc.h:30:70: error: 'mcontext_t {aka struct <anonymous>}' has no
member named 'gregs'
#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *)
ucp)->uc_mcontext.gregs[REG_O6]
This is due to the fact that the #define for SIGSEGV_FAULT_STACKPOINTER uses an
outdated
variable name for the gregs member in uc_mcontext. It should be renamed from
"gregs"
to "mc_gregs".
The attached patch does exactly that and fixes the FTBFS on sparc64 and sparc
(V9/V8+).
Please apply the patch to help us with the porting efforts for sparc64.
Credits for the patch to Romain Dolbeau <[email protected]>.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - [email protected]
`. `' Freie Universitaet Berlin - [email protected]
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Description: Fix the definition of SIGSEGV_FAULT_STACKPOINTER for sparc
The definition of SIGSEGV_FAULT_STACKPOINTER uses an outdated variable
identifier for the register window array. sparc V8+ and later renamed
this array from gregs to mc_gregs. This patch fixes an FTBFS.
.
--- libsigsegv-2.9.orig/src/fault-linux-sparc.h
+++ libsigsegv-2.9/src/fault-linux-sparc.h
@@ -27,4 +27,4 @@
(see also <asm/sigcontext.h>)
are quite different types. */
-#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_O6]
+#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.mc_gregs[REG_O6]