OSDN Git Service

configure: don't try a "native" cross for linux-user
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 20 Nov 2023 15:08:32 +0000 (15:08 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 23 Nov 2023 14:10:06 +0000 (14:10 +0000)
commitc2118e9e1ab34edb1b5d1b0b4092cb12271a593d
treef3fb317da27b60d9acf8c3ba6b81afe66b592e18
parent8848c5296777f67fb2811bc434312f8b75c9a0d1
configure: don't try a "native" cross for linux-user

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

This is likely to affect more and more linux-user builds so wrap the
whole check in a test for softmmu targets (aka bare metal) which don't
worry about such header niceties. This allows us to keep using the
host compiler for softmmu tests and the roms.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231120150833.2552739-14-alex.bennee@linaro.org>
configure