[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] configure: don't try a "native" cross for i386
|
From: |
Daniel P . Berrangé |
|
Subject: |
Re: [RFC PATCH] configure: don't try a "native" cross for i386 |
|
Date: |
Thu, 16 Nov 2023 17:49:06 +0000 |
|
User-agent: |
Mutt/2.2.10 (2023-03-25) |
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 :|