Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/Makefile,v retrieving revision 1.207 diff -p -u -r1.207 Makefile --- Makefile 27 Apr 2019 18:00:46 -0000 1.207 +++ Makefile 17 May 2019 02:50:18 -0000 @@ -99,8 +99,13 @@ UE_ARCHS+= or1k ppc ppc64 ppc64abi32 sh UE_ARCHS+= sparc64 x86_64 microblazeel s390x unicore32 .if ${OPSYS} == "NetBSD" -USER_EMUL= i386 x86_64 sparc sparc64 +SUPP_USER_EMUL= i386 x86_64 sparc sparc64 PLIST.nbd= YES +. if empty(SUPP_USER_EMUL:M${MACHINE_ARCH}) +CONFIGURE_ARGS+= --disable-bsd-user +. else +USER_EMUL= ${SUPP_USER_EMUL} +. endif .elif !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" USER_EMUL= i386 x86_64 sparc sparc64 PLIST.nbd= YES Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/distinfo,v retrieving revision 1.148 diff -p -u -r1.148 distinfo --- distinfo 27 Apr 2019 18:00:46 -0000 1.148 +++ distinfo 17 May 2019 02:50:18 -0000 @@ -5,6 +5,7 @@ RMD160 (qemu-4.0.0.tar.xz) = 58135f00c39 SHA512 (qemu-4.0.0.tar.xz) = 952e94194ce9e64c15388c59035cb31fb9f761d30095c2fb9441012b609c18c9976285727b93bf37b95e15675802d73f8e1c4619ebecd23606675bb503646b13 Size (qemu-4.0.0.tar.xz) = 55628624 bytes SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c +SHA1 (patch-accel_tcg_user-exec.c) = f89e4f09f03a4150387a26040ca374d8896de91a SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 SHA1 (patch-configure) = 14c09363622bcee113b7fda5bd3f031bd9ff6b90 SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984 Index: patches/patch-accel_tcg_user-exec.c =================================================================== RCS file: patches/patch-accel_tcg_user-exec.c diff -N patches/patch-accel_tcg_user-exec.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-accel_tcg_user-exec.c 17 May 2019 02:50:18 -0000 @@ -0,0 +1,37 @@ +$NetBSD$ + +add netbsd/arm64 support. + +--- accel/tcg/user-exec.c.orig 2019-04-23 11:14:45.000000000 -0700 ++++ accel/tcg/user-exec.c 2019-05-16 17:16:36.702925265 -0700 +@@ -454,11 +454,7 @@ + void *puc) + { + siginfo_t *info = pinfo; +-#if defined(__NetBSD__) +- ucontext_t *uc = puc; +-#else + ucontext_t *uc = puc; +-#endif + unsigned long pc; + int is_write; + +@@ -502,11 +498,17 @@ + { + siginfo_t *info = pinfo; + ucontext_t *uc = puc; +- uintptr_t pc = uc->uc_mcontext.pc; ++ uintptr_t pc; + bool is_write; + struct _aarch64_ctx *hdr; + struct esr_context const *esrctx = NULL; + ++#if defined(__NetBSD__) ++ pc = uc->uc_mcontext.__gregs[_REG_PC]; ++#else ++ pc = uc->uc_mcontext.pc; ++#endif ++ + /* Find the esr_context, which has the WnR bit in it */ + for (hdr = first_ctx(uc); hdr->magic; hdr = next_ctx(hdr)) { + if (hdr->magic == ESR_MAGIC) {