All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>
Subject: Re: [RFC PATCH] configure: don't try a "native" cross for i386
Date: Thu, 16 Nov 2023 17:49:06 +0000	[thread overview]
Message-ID: <ZVZWEhYbF_0MzEFA@redhat.com> (raw)
In-Reply-To: <20231116172820.2481604-1-alex.bennee@linaro.org>

On Thu, Nov 16, 2023 at 05:28:20PM +0000, Alex Bennée wrote:
> As 32 bit x86 become rarer we are starting to run into problems with
> search paths. Although we switched to a Debian container we still
> favour the native CC on a Bookworm host. As a result we have a broken
> cross compile setup which then fails to build with:
> 
>     BUILD   i386-linux-user guest-tests
>   In file included from /usr/include/linux/stat.h:5,
>                    from /usr/include/bits/statx.h:31,
>                    from /usr/include/sys/stat.h:465,
>                    from /home/alex/lsrc/qemu.git/tests/tcg/multiarch/linux/linux-test.c:28:
>   /usr/include/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
>       5 | #include <asm/types.h>
>         |          ^~~~~~~~~~~~~
>   compilation terminated.
>   make[1]: *** [Makefile:119: linux-test] Error 1
>   make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:50: build-tcg-tests-i386-linux-user] Error 2
> 
> So lets stop trying to be cute and honour cross_prefix_i386 when
> searching locally. We also need to ensure we are using the correct
> prefix if we do end up using the container version. We can also drop
> the extra CFLAGS while we are at it.
> 
> Fixes: 791e6fedc5 (tests/docker: replace fedora-i386 with debian-i686)
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

> 
> diff --git a/configure b/configure
> index 5e7b76e3a1..2343d629ec 100755
> --- a/configure
> +++ b/configure
> @@ -1190,7 +1190,6 @@ fi
>  : ${cross_cc_cflags_armeb="-mbig-endian"}
>  : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
>  : ${cross_cc_cflags_hexagon="-mv73 -O2 -static"}
> -: ${cross_cc_cflags_i386="-m32"}
>  : ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
>  : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
>  : ${cross_cc_ppc64le="$cross_cc_ppc64"}
> @@ -1308,7 +1307,7 @@ probe_target_compiler() {
>          ;;
>        i386)
>          container_image=debian-i686-cross
> -        container_cross_prefix=
> +        container_cross_prefix=i686-linux-gnu-
>          ;;
>        loongarch64)
>          container_image=debian-loongarch-cross
> @@ -1394,7 +1393,6 @@ probe_target_compiler() {
>    case "$target_arch:$cpu" in
>      aarch64_be:aarch64 | \
>      armeb:arm | \
> -    i386:x86_64 | \
>      mips*:mips64 | \
>      ppc*:ppc64 | \
>      sparc:sparc64 | \

I kinda wonder if we have people using the rest of this arch compat
stuff too ? With debian making it easy to parallel install the full
cross-arch toolchains + matching libraries, it shouldn't be needed in
general for any arch ?  Getting rid of QEMU specific special cases
like this in configure would be nice.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-11-16 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 17:28 [RFC PATCH] configure: don't try a "native" cross for i386 Alex Bennée
2023-11-16 17:49 ` Daniel P. Berrangé [this message]
2023-11-20 10:35 ` Paolo Bonzini

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=ZVZWEhYbF_0MzEFA@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 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.