summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-09-18 16:19:37 -0700
committerSteve Sakoman <steve@sakoman.com>2024-10-29 05:51:03 -0700
commit2b82219880dc753c0687f2db183dfc432c04cce0 (patch)
treeb31e978572782c2b52a154aa74cac0b97bbc6085 /meta/recipes-devtools
parent90404038a99f86dedbe71e5c4f56f32873120873 (diff)
downloadpoky-2b82219880dc753c0687f2db183dfc432c04cce0.tar.gz
qemu: Fix build on musl/riscv64
musl does not provide strerrorname_np() so do not use it. (From OE-Core rev: 36b05346e63f9885da45a3c3a06ad5f6a5cd905c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d7678118af5aa4bfbf6fb72b34f90a1e37b917c3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch27
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index f37b32985b..2786eedd42 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -21,6 +21,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
21SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ 21SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
22 file://powerpc_rom.bin \ 22 file://powerpc_rom.bin \
23 file://run-ptest \ 23 file://run-ptest \
24 file://fix-strerrorname_np.patch \
24 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ 25 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
25 file://0002-apic-fixup-fallthrough-to-PIC.patch \ 26 file://0002-apic-fixup-fallthrough-to-PIC.patch \
26 file://0003-configure-Add-pkg-config-handling-for-libgcrypt.patch \ 27 file://0003-configure-Add-pkg-config-handling-for-libgcrypt.patch \
diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
new file mode 100644
index 0000000000..5098e8a4e5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
@@ -0,0 +1,27 @@
1target/riscv/kvm: do not use non-portable strerrorname_np()
2
3strerrorname_np is non-portable and breaks building with musl libc.
4
5Use strerror(errno) instead, like we do other places.
6
7Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
8
9Cc: qemu-stable@nongnu.org
10Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
11msg)
12Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
13Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
14Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
15
16--- a/target/riscv/kvm/kvm-cpu.c
17+++ b/target/riscv/kvm/kvm-cpu.c
18@@ -1731,8 +1731,7 @@ static bool kvm_cpu_realize(CPUState *cs
19 if (riscv_has_ext(&cpu->env, RVV)) {
20 ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
21 if (ret) {
22- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
23- strerrorname_np(errno));
24+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
25 return false;
26 }
27 }