aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-01-14 16:03:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2022-01-14 17:04:42 +0100
commit742ae5da337deafbdff7976bd15cd050f9c28550 (patch)
tree6d3603a1bec96aa8b1bbb53464ec24348dafb402
parentfa3020b1d7207293a42f4260ed18f38d90c7ce9b (diff)
downloadaports-742ae5da337deafbdff7976bd15cd050f9c28550.tar.gz
aports-742ae5da337deafbdff7976bd15cd050f9c28550.tar.bz2
aports-742ae5da337deafbdff7976bd15cd050f9c28550.tar.xz
community/qemu: simplify ppc64 fix
Use same approach as with libgo in gcc.
-rw-r--r--community/qemu/APKBUILD4
-rw-r--r--community/qemu/fix-ppc.patch39
2 files changed, 12 insertions, 31 deletions
diff --git a/community/qemu/APKBUILD b/community/qemu/APKBUILD
index debeb9ef80..66e6b332d1 100644
--- a/community/qemu/APKBUILD
+++ b/community/qemu/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=6.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="https://qemu.org/"
arch="all"
@@ -477,7 +477,7 @@ sha512sums="
e9f8231c9e1cfcc41cb47f10a55d63f6b8aee307af00cf6acf64acb7aa4f49fa7e9d6330703a2abea15d8b7bbaba7d3cb08c83edd98d82642367b527df730817 qemu-6.2.0.tar.xz
98db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
4b1e26ba4d53f9f762cbd5cea8ef6f8062d827ae3ae07bc36c5b0c0be4e94fc1856ad2477e8e791b074b8a25d51ed6d0ddd75e605e54600e5dd0799143793ce4 xattr_size_max.patch
-5c00715cc00567346945747ca5b30a4ae8d158025d770cf2a0751177dc38780730977fe3fbadd25bc438c490c3a7abfcb400f51c222c2d98b4aede6323a1d3e9 fix-ppc.patch
+90c5424230914da5c8f04663892521c6a2775510cec980d7021ca99154465e56312620235827ec5fa71a909f16a85222aac8205d21b46ce3f70f49507d7f98a2 fix-ppc.patch
d7de79ea74e36702cac4a59e472564a55f0a663be7e63c3755e32b4b5dfbc04b390ee79f09f43f6ae706ee2aec9e005eade3c0fd4a202db60d11f436874a17d7 MAP_SYNC-fix.patch
39590476a4ebd7c1e79a4f0451b24c75b1817a2a83abaa1f71bb60b225d772152f0af8f3e51ff65645e378c536ffa6ff551dade52884d03a14b7c6a19c5c97d4 fix-sockios-header.patch
d6b81846cefd46b8fd1fb04450d4898f97dc77d11e049fb1bc8e2553bbb88c8325151d0e4bec70cc6820a5863c1d1749b99100b4747d91182856c3ca1946cb28 guest-agent-shutdown.patch
diff --git a/community/qemu/fix-ppc.patch b/community/qemu/fix-ppc.patch
index df2fcff6f6..8ff64371f7 100644
--- a/community/qemu/fix-ppc.patch
+++ b/community/qemu/fix-ppc.patch
@@ -1,36 +1,17 @@
diff --git a/linux-user/host/ppc/host-signal.h b/linux-user/host/ppc/host-signal.h
-index 1d8e658..6ba11fc 100644
+index 1d8e658ff..9dc6fdb3e 100644
--- a/linux-user/host/ppc/host-signal.h
+++ b/linux-user/host/ppc/host-signal.h
-@@ -13,18 +13,31 @@
+@@ -11,6 +11,12 @@
+ #ifndef PPC_HOST_SIGNAL_H
+ #define PPC_HOST_SIGNAL_H
++// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
++// type. This type must be completed by including asm/ptrace.h.
++#ifdef __PPC__
++#include <asm/ptrace.h>
++#endif
++
static inline uintptr_t host_signal_pc(ucontext_t *uc)
{
-+#if defined(__linux__) && !(defined (__GLIBC__) || defined(__UCLIBC__)) // musl libc
-+ return uc->uc_mcontext.gp_regs[32];
-+#else
return uc->uc_mcontext.regs->nip;
-+#endif
- }
-
- static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
- {
-+#if defined(__linux__) && !(defined (__GLIBC__) || defined(__UCLIBC__)) // musl libc
-+ uc->uc_mcontext.gp_regs[32] = pc;
-+#else
- uc->uc_mcontext.regs->nip = pc;
-+#endif
- }
-
- static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
- {
-+#if defined(__linux__) && !(defined (__GLIBC__) || defined(__UCLIBC__)) // musl libc
-+ return uc->uc_mcontext.gp_regs[40] != 0x400
-+ && (uc->uc_mcontext.gp_regs[42] & 0x02000000);
-+#else
- return uc->uc_mcontext.regs->trap != 0x400
- && (uc->uc_mcontext.regs->dsisr & 0x02000000);
-+#endif
- }
-
- #endif