* [hotfix PATCH-for-8.1] meson: Fix cross-building for RISCV host
@ 2023-07-11 8:54 Philippe Mathieu-Daudé
2023-07-11 9:02 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-11 8:54 UTC (permalink / raw)
To: qemu-devel
Cc: Marc-André Lureau, Philippe Mathieu-Daudé,
Daniel P. Berrangé,
Thomas Huth, Paolo Bonzini, Richard Henderson
While when building on native Linux the host architecture
is reported as "riscv32" or "riscv64", when cross-compiling
it is detected as "riscv". Meson handles the cross-detection
but displays a warning:
WARNING: Unknown CPU family riscv, please report this at https://github.com/mesonbuild/meson/issues/new
Commit 278c1bcef5 was tested on native host but not under
cross environment, and now we get there [*]:
../meson.build:684:6: ERROR: Problem encountered: Unsupported CPU riscv, try --enable-tcg-interpreter
Instead of:
Found pkg-config: /usr/bin/riscv64-linux-gnu-pkg-config (1.8.1)
As a kludge, re-introduce "riscv" in the supported_cpus[] array.
Fixes: 278c1bcef5 ("target/riscv: Only unify 'riscv32/64' -> 'riscv' for host cpu in meson")
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 5fcdb37a71..58e35febb9 100644
--- a/meson.build
+++ b/meson.build
@@ -55,7 +55,7 @@ qapi_trace_events = []
bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
-supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
+supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'riscv32', 'riscv64', 'x86', 'x86_64',
'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64']
cpu = host_machine.cpu_family()
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [hotfix PATCH-for-8.1] meson: Fix cross-building for RISCV host
2023-07-11 8:54 [hotfix PATCH-for-8.1] meson: Fix cross-building for RISCV host Philippe Mathieu-Daudé
@ 2023-07-11 9:02 ` Philippe Mathieu-Daudé
2023-07-11 9:25 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-11 9:02 UTC (permalink / raw)
To: qemu-devel
Cc: Marc-André Lureau, Daniel P. Berrangé,
Thomas Huth, Paolo Bonzini, Richard Henderson
On 11/7/23 10:54, Philippe Mathieu-Daudé wrote:
> While when building on native Linux the host architecture
> is reported as "riscv32" or "riscv64", when cross-compiling
> it is detected as "riscv". Meson handles the cross-detection
> but displays a warning:
>
> WARNING: Unknown CPU family riscv, please report this at https://github.com/mesonbuild/meson/issues/new
>
> Commit 278c1bcef5 was tested on native host but not under
> cross environment, and now we get there [*]:
Richard, if this works for you, please scratch this " [*]",
I meant to list
"https://gitlab.com/qemu-project/qemu/-/jobs/4627545569#L128" but then
realized this link will
expire in few days so be irrelevant in the commit desc.
>
> ../meson.build:684:6: ERROR: Problem encountered: Unsupported CPU riscv, try --enable-tcg-interpreter
>
> Instead of:
>
> Found pkg-config: /usr/bin/riscv64-linux-gnu-pkg-config (1.8.1)
>
> As a kludge, re-introduce "riscv" in the supported_cpus[] array.
>
> Fixes: 278c1bcef5 ("target/riscv: Only unify 'riscv32/64' -> 'riscv' for host cpu in meson")
> Reported-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [hotfix PATCH-for-8.1] meson: Fix cross-building for RISCV host
2023-07-11 9:02 ` Philippe Mathieu-Daudé
@ 2023-07-11 9:25 ` Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-07-11 9:25 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Marc-André Lureau, Daniel P. Berrangé,
Thomas Huth, Paolo Bonzini
On 7/11/23 10:02, Philippe Mathieu-Daudé wrote:
> On 11/7/23 10:54, Philippe Mathieu-Daudé wrote:
>> While when building on native Linux the host architecture
>> is reported as "riscv32" or "riscv64", when cross-compiling
>> it is detected as "riscv". Meson handles the cross-detection
>> but displays a warning:
>>
>> WARNING: Unknown CPU family riscv, please report this at
>> https://github.com/mesonbuild/meson/issues/new
>>
>> Commit 278c1bcef5 was tested on native host but not under
>> cross environment, and now we get there [*]:
>
> Richard, if this works for you, please scratch this " [*]",
> I meant to list "https://gitlab.com/qemu-project/qemu/-/jobs/4627545569#L128" but then
> realized this link will
> expire in few days so be irrelevant in the commit desc.
Thanks. I'll apply this after the current run completes.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-11 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 8:54 [hotfix PATCH-for-8.1] meson: Fix cross-building for RISCV host Philippe Mathieu-Daudé
2023-07-11 9:02 ` Philippe Mathieu-Daudé
2023-07-11 9:25 ` Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.