mirror of
https://git.yoctoproject.org/poky
synced 2026-04-02 17:02:21 +02:00
qemu: Fix build on aarch64/musl
(From OE-Core rev: 35040bba25bf994fa9e03f2b8f0c49822c41192c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -26,6 +26,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://mmap2.patch \
|
||||
file://determinism.patch \
|
||||
file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
|
||||
file://0001-linux-user-Replace-__u64-with-uint64_t.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 5cc7b63299602d0aa8b57c684bbd9829856d54ad Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 8 Nov 2021 11:39:26 -0800
|
||||
Subject: [PATCH] linux-user: Replace __u64 with uint64_t
|
||||
|
||||
uint64_t is available in all userspaces via compiler include stdint.h
|
||||
therefore use it instead of __u64 which is linux internal type, it fixes
|
||||
build on some platforms eg. aarch64 systems using musl C library
|
||||
|
||||
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg01955.html]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
linux-user/host/aarch64/hostdep.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h
|
||||
index a8d41a21ad..34d934f665 100644
|
||||
--- a/linux-user/host/aarch64/hostdep.h
|
||||
+++ b/linux-user/host/aarch64/hostdep.h
|
||||
@@ -25,7 +25,7 @@ extern char safe_syscall_end[];
|
||||
static inline void rewind_if_in_safe_syscall(void *puc)
|
||||
{
|
||||
ucontext_t *uc = puc;
|
||||
- __u64 *pcreg = &uc->uc_mcontext.pc;
|
||||
+ uint64_t *pcreg = &uc->uc_mcontext.pc;
|
||||
|
||||
if (*pcreg > (uintptr_t)safe_syscall_start
|
||||
&& *pcreg < (uintptr_t)safe_syscall_end) {
|
||||
--
|
||||
2.33.1
|
||||
|
||||
@@ -4,6 +4,8 @@ require qemu.inc
|
||||
|
||||
DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
|
||||
|
||||
DEPENDS:append:libc-musl = " libucontext"
|
||||
|
||||
RDEPENDS:${PN}:class-target += "bash"
|
||||
|
||||
EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
|
||||
|
||||
Reference in New Issue
Block a user