[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] build: try both native and cross compilers for linux-use
From: |
Matheus Kowalczuk Ferst |
Subject: |
Re: [PATCH 2/2] build: try both native and cross compilers for linux-user tests |
Date: |
Wed, 22 Jun 2022 17:30:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 22/06/2022 10:47, Paolo Bonzini wrote:
> Configure is trying to fall back on cross compilers for targets that
> can have bi-arch or bi-endian toolchains, but there are many corner
> cases where just checking the name can go wrong. For example, the RHEL
> ppc64le compiler is bi-arch and bi-endian, but multilibs are disabled.
> Therefore it cannot be used to build 32-bit hosted binaries like the
> linux-user TCG tests.
>
> Trying the cross compiler first also does not work, and an example for
> this is also ppc64le. The powerpc64-linux-gnu-gcc binary from the
> cross-gcc package is theoretically multilib-friendly, but it cannot
> find the CRT files on a ppc64le host, because they are not in the .../le
> multilib subdirectory.
>
> This can be fixed by testing both the native compiler and the cross
> compiler, and proceeding with the first one that works. To do this,
> move the compiler usability check from the tests/tcg snippet to inside
> probe_target_compiler and, while at it, restrict it to just the user-mode
> emulation tests; if a compiler is not able to build nostdlib freestanding
> binaries the installation is broken.
> ---
> configure | 166 ++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 100 insertions(+), 66 deletions(-)
>
With this patch I can successfully build ppc64le-linux-user tests on
ppc64le hosts (Debian and Fedora) and ppc{,64}-linux-user tests on ppc64
hosts (Void Linux).
Tested-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Thanks,
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>