From: Paolo Bonzini <pbonzini@redhat.com>
To: Joel Stanley <joel@jms.id.au>,
Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] configure: Fix linux-user host detection for ppc64le
Date: Mon, 7 Aug 2023 10:54:07 +0200 [thread overview]
Message-ID: <4cbf15ac-763c-106f-b98f-6dac1d15542b@redhat.com> (raw)
In-Reply-To: <20230807083950.29521-1-joel@jms.id.au>
On 8/7/23 10:39, Joel Stanley wrote:
>
> -case "$cpu" in
> - riscv*)
> - host_arch=riscv ;;
> - *)
> - host_arch="$cpu" ;;
> -esac
> -
> # Normalise host CPU name and set multilib cflags. The canonicalization
> # isn't really necessary, because the architectures that we check for
> # should not hit the 'uname -m' case, but better safe than sorry.
> @@ -508,6 +501,9 @@ case "$cpu" in
> cpu="ppc64"
> CPU_CFLAGS="-m64 -mlittle-endian" ;;
>
> + riscv*)
> + cpu="riscv" ;;
> +
This is also wrong because it confuses riscv32 and riscv64, which
matters both for tests/tcg, and when creating the Meson cross file[1]
Instead, the "case $cpu" that sets $host_arch must be placed after $cpu
is canonicalized (and possibly just before $host_arch is used to find
linux-user).
Even better, there is already a variable $linux_arch that has the same
meaning. I'll send a patch to unify the two.
Paolo
[1] https://mesonbuild.com/Reference-tables.html#cpu-families
> s390)
> CPU_CFLAGS="-m31" ;;
> s390x)
> @@ -810,7 +806,7 @@ default_target_list=""
> mak_wilds=""
>
> if [ "$linux_user" != no ]; then
> - if [ "$targetos" = linux ] && [ -d "$source_path/linux-user/include/host/$host_arch" ]; then
> + if [ "$targetos" = linux ] && [ -d "$source_path/linux-user/include/host/$cpu" ]; then
> linux_user=yes
> elif [ "$linux_user" = yes ]; then
prev parent reply other threads:[~2023-08-07 8:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 8:39 [PATCH] configure: Fix linux-user host detection for ppc64le Joel Stanley
2023-08-07 8:54 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4cbf15ac-763c-106f-b98f-6dac1d15542b@redhat.com \
--to=pbonzini@redhat.com \
--cc=joel@jms.id.au \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).