Skip to contentSkip to conversation

qemu: Fix build on ppc64

PATCH Superseded Khem Raj 1 participant 1 message Mar 14, 2022

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 qemu: Fix build on ppc64

add a missing system include

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 ...ptrace.h-for-pt_regs-struct-definiti.patch | 36 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 86bf2c1016f..216af037a66 100644
@@ -28,6 +28,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
            file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \
            file://0001-acpi-tpm-Add-missing-device-identification-objects.patch \
+           file://0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch new file +36 -0
new file mode 100644
index 00000000000..a2b6149b32b
@@ -0,0 +1,36 @@
+From 91e15627fd05d5a59fd2b88bc5c3491d3e0b56b0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 14 Mar 2022 09:58:21 -0700
+Subject: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes
+../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs'
+    return uc->uc_mcontext.regs->nip;
+           ~~~~~~~~~~~~~~~~~~~~^
+
+Upstream-Status: Submitted [https://patchwork.kernel.org/project/qemu-devel/patch/[email protected]/]
+
+Signed-off-by: Khem Raj <[email protected]>
+Cc: Peter Maydell <[email protected]>
+Cc: Philippe Mathieu-Daudé <[email protected]>
+Cc: Richard Henderson <[email protected]>
+---
+ linux-user/include/host/ppc/host-signal.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/linux-user/host/ppc/host-signal.h
++++ b/linux-user/host/ppc/host-signal.h
+@@ -11,6 +11,10 @@
+ #ifndef PPC_HOST_SIGNAL_H
+ #define PPC_HOST_SIGNAL_H
+ 
++#if defined(__powerpc__)
++#include <asm/ptrace.h>
++#endif
++
+ static inline uintptr_t host_signal_pc(ucontext_t *uc)
+ {
+     return uc->uc_mcontext.regs->nip;
Signature · 1 line
2.35.1