summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-11-08 12:41:57 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-10 19:27:28 +0000
commite4ade82d40489331a008cdc0ec65f8c29ebcb533 (patch)
tree112aade33b0839b079f360150e8a7581b1d34a77 /meta
parentec2ba25376916857ec4cb66a9081fba8b7099d07 (diff)
downloadpoky-e4ade82d40489331a008cdc0ec65f8c29ebcb533.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-linux-user-Replace-__u64-with-uint64_t.patch31
-rw-r--r--meta/recipes-devtools/qemu/qemu_6.1.0.bb2
3 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 33052a9d49..8cc4600cad 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -26,6 +26,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
26 file://mmap2.patch \ 26 file://mmap2.patch \
27 file://determinism.patch \ 27 file://determinism.patch \
28 file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ 28 file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
29 file://0001-linux-user-Replace-__u64-with-uint64_t.patch \
29 " 30 "
30UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 31UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
31 32
diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-Replace-__u64-with-uint64_t.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-Replace-__u64-with-uint64_t.patch
new file mode 100644
index 0000000000..3d5c890b0f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-linux-user-Replace-__u64-with-uint64_t.patch
@@ -0,0 +1,31 @@
1From 5cc7b63299602d0aa8b57c684bbd9829856d54ad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 8 Nov 2021 11:39:26 -0800
4Subject: [PATCH] linux-user: Replace __u64 with uint64_t
5
6uint64_t is available in all userspaces via compiler include stdint.h
7therefore use it instead of __u64 which is linux internal type, it fixes
8build on some platforms eg. aarch64 systems using musl C library
9
10Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg01955.html]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 linux-user/host/aarch64/hostdep.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h
17index a8d41a21ad..34d934f665 100644
18--- a/linux-user/host/aarch64/hostdep.h
19+++ b/linux-user/host/aarch64/hostdep.h
20@@ -25,7 +25,7 @@ extern char safe_syscall_end[];
21 static inline void rewind_if_in_safe_syscall(void *puc)
22 {
23 ucontext_t *uc = puc;
24- __u64 *pcreg = &uc->uc_mcontext.pc;
25+ uint64_t *pcreg = &uc->uc_mcontext.pc;
26
27 if (*pcreg > (uintptr_t)safe_syscall_start
28 && *pcreg < (uintptr_t)safe_syscall_end) {
29--
302.33.1
31
diff --git a/meta/recipes-devtools/qemu/qemu_6.1.0.bb b/meta/recipes-devtools/qemu/qemu_6.1.0.bb
index 017a054d5d..c9a53e3b05 100644
--- a/meta/recipes-devtools/qemu/qemu_6.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_6.1.0.bb
@@ -4,6 +4,8 @@ require qemu.inc
4 4
5DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" 5DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
6 6
7DEPENDS:append:libc-musl = " libucontext"
8
7RDEPENDS:${PN}:class-target += "bash" 9RDEPENDS:${PN}:class-target += "bash"
8 10
9EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" 11EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"