From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Joel Stanley <joel@jms.id.au>, qemu-devel@nongnu.org
Subject: Re: [PATCH] configure: Fix linux-user host detection for riscv64
Date: Mon, 7 Aug 2023 17:03:21 +0100 [thread overview]
Message-ID: <CAFEAcA9fc75qiPFnx5435Bv9dy9UBUNT-bPo4iLmgi26Mv=dcw@mail.gmail.com> (raw)
In-Reply-To: <609387ae-de8e-61bf-842a-b277ecfc345c@linaro.org>
On Mon, 7 Aug 2023 at 17:01, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 8/7/23 01:26, Joel Stanley wrote:
> > On Sat, 5 Aug 2023 at 18:02, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> >>
> >> Mirror the host_arch variable from meson.build, so that we
> >> probe for the correct linux-user/include/host/ directory.
> >
> > This broke all of the linux-user targets for me on a ppc64le host.
> > None show up when running configure --help, and trying to select one
> > with --target-list errors out:
> >
> > ERROR: Unknown target name 'aarch64-linux-user'
> >
> > Reverting this patch restores the old behaviour.
> >
> > This test is the one that fails with the patch applied:
> >
> > if [ "$linux_user" != no ]; then
> > if [ "$targetos" = linux ] && [ -d
> > "$source_path/linux-user/include/host/$host_arch" ]; then
> > linux_user=yes
> >
> > WIth your patch $host_arch is ppc64le. Previously the line was:
> >
> > if [ "$linux_user" != no ]; then
> > if [ "$targetos" = linux ] && [ -d
> > "$source_path/linux-user/include/host/$cpu" ]; then
> > linux_user=yes
> >
> > The directory needs to be /linux-user/include/host/ppc64 for even for ppc64le.
> >
> > You've put the new test just above the switch statement that does
> > normalisation of the host CPU name. Could add riscv to that switch
> > statement instead of adding the host_arch variable?
> >
> > @@ -508,6 +501,9 @@ case "$cpu" in
> > cpu="ppc64"
> > CPU_CFLAGS="-m64 -mlittle-endian" ;;
> >
> > + riscv*)
> > + cpu="riscv" ;;
> > +
> > s390)
> > CPU_CFLAGS="-m31" ;;
> > s390x)
>
> Grr. No, I cannot simply do that, because passing "riscv" and not "riscv64" to meson also
> breaks things. See e3e477c3 and 887cba85.
>
> I'll figure out something else.
Did you see Paolo's patchset?
https://patchew.org/QEMU/20230807094807.471646-1-pbonzini@redhat.com/
-- PMM
next prev parent reply other threads:[~2023-08-07 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 18:02 [PATCH] configure: Fix linux-user host detection for riscv64 Richard Henderson
2023-08-07 8:26 ` Joel Stanley
2023-08-07 16:00 ` Richard Henderson
2023-08-07 16:03 ` Peter Maydell [this message]
2023-08-07 16:04 ` Michael Tokarev
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='CAFEAcA9fc75qiPFnx5435Bv9dy9UBUNT-bPo4iLmgi26Mv=dcw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--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).