summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2015-03-06 13:22:03 +0000
committertnn <tnn@pkgsrc.org>2015-03-06 13:22:03 +0000
commitdeb32caa8eb619475a674dbb2977db51544a8f0b (patch)
tree01555e29b0a54dcdf06c9b87e6c95a3170675a5f /emulators
parent35519208381a3e378712ef5c5d89df1c9fbdb265 (diff)
downloadpkgsrc-deb32caa8eb619475a674dbb2977db51544a8f0b.tar.gz
Replace user-exec.c patch with cleaned up version which was sent upstream.
Includes PR pkg/49723 fix for sparc64.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/distinfo4
-rw-r--r--emulators/qemu/patches/patch-user-exec.c43
2 files changed, 34 insertions, 13 deletions
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index f76080f25b8..b5a3b071a9b 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.100 2015/01/07 21:39:24 wiedi Exp $
+$NetBSD: distinfo,v 1.101 2015/03/06 13:22:03 tnn Exp $
SHA1 (qemu-2.2.0.tar.bz2) = 9a16623775a92fd25334f4eced4e6a56ab536233
RMD160 (qemu-2.2.0.tar.bz2) = 9a156bdefd8fad72154eee1b10ed53a0e4c1c9a2
@@ -14,4 +14,4 @@ SHA1 (patch-hw_ppc_mac__oldworld.c) = 46322c77c87be6d517c43466325c344db99cd463
SHA1 (patch-memory.c) = 14df9c835ca318fc79a8d3a46bb94d2f229277cc
SHA1 (patch-slirp_tcp__subr.c) = cfc8289384fa987289e32b64532c13a83a890820
SHA1 (patch-tests_Makefile) = 81fe639ce1b04302f53024343fdf1f6fd5d5fedb
-SHA1 (patch-user-exec.c) = eb83832c7c9e5f69313f8cad2c2f77b304072556
+SHA1 (patch-user-exec.c) = 9090d368b31c70a81af4e8b08d0267c597ff248e
diff --git a/emulators/qemu/patches/patch-user-exec.c b/emulators/qemu/patches/patch-user-exec.c
index 5c5580ddd76..b527eb26b40 100644
--- a/emulators/qemu/patches/patch-user-exec.c
+++ b/emulators/qemu/patches/patch-user-exec.c
@@ -1,10 +1,36 @@
-$NetBSD: patch-user-exec.c,v 1.4 2014/01/15 18:26:20 wiz Exp $
+$NetBSD: patch-user-exec.c,v 1.5 2015/03/06 13:22:03 tnn Exp $
-Add OS dependent code for NetBSD/arm.
+From 3f9744aaaeeaea9c55c814b9e7be0f8cce1fb7f9 Mon Sep 17 00:00:00 2001
+From: Tobias Nygren <tnn@NetBSD.org>
+To: qemu-devel@nongnu.org
+Cc: Tobias Nygren <tnn@NetBSD.org>
+Date: Thu, 5 Mar 2015 22:15:08 +0100
+Subject: [PATCH] user-exec.c: fix build on NetBSD/sparc64 and NetBSD/arm
---- user-exec.c.orig 2013-11-27 22:15:55.000000000 +0000
+A couple of #ifdef changes necessary to use NetBSD's ucontext
+structs on sparc64 and arm.
+
+Signed-off-by: Tobias Nygren <tnn@NetBSD.org>
+---
+ user-exec.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/user-exec.c b/user-exec.c
+index 1ff8673..8f57e8a 100644
+--- user-exec.c
+++ user-exec.c
-@@ -434,19 +434,31 @@ int cpu_signal_handler(int host_signum,
+@@ -404,6 +404,10 @@ int cpu_signal_handler(int host_signum, void *pinfo,
+ struct sigcontext *uc = puc;
+ unsigned long pc = uc->sc_pc;
+ void *sigmask = (void *)(long)uc->sc_mask;
++#elif defined(__NetBSD__)
++ ucontext_t *uc = puc;
++ unsigned long pc = _UC_MACHINE_PC(uc);
++ void *sigmask = (void *)&uc->uc_sigmask;
+ #endif
+ #endif
+
+@@ -441,15 +445,25 @@ int cpu_signal_handler(int host_signum, void *pinfo,
#elif defined(__arm__)
@@ -24,15 +50,10 @@ Add OS dependent code for NetBSD/arm.
unsigned long pc;
int is_write;
+-#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
+#if defined(__NetBSD__)
+ pc = uc->uc_mcontext.__gregs[_REG_R15];
-+#else
- #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
++#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
pc = uc->uc_mcontext.gregs[R15];
#else
pc = uc->uc_mcontext.arm_pc;
- #endif
-+#endif
-
- /* error_code is the FSR value, in which bit 11 is WnR (assuming a v6 or
- * later processor; on v5 we will always report this as a read).