qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 20/33] configure: handle host compiler in probe_target_compile


From: Paolo Bonzini
Subject: Re: [PULL 20/33] configure: handle host compiler in probe_target_compiler
Date: Wed, 22 Jun 2022 10:39:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 6/21/22 20:30, Richard Henderson wrote:
On 6/21/22 09:58, Paolo Bonzini wrote:
On 6/20/22 18:41, Matheus Kowalczuk Ferst wrote:
On 17/06/2022 07:12, Paolo Bonzini wrote:
Hi Matheus,

could you please test the tests-tcg-next branch at
https://gitlab.com/bonzini/qemu?
At be6090bcac10, it works if no BE toolchain is present. Otherwise, the
script probes powerpc64-linux-gnu-gcc instead of the native tools for
ppc64le-linux-user, and then do_compiler fails because the
$target_cflags contains -mlittle-endian.


So the problem in that case is that powerpc64-linux-gnu-gcc is _not_
biarch and thus does not support -mlittle-endian?  (I thought PPC
compilers were all 32/64-bit and bi-endian).

Nit: this is ppc64le-linux-gnu-gcc, built for gcc135, a power9 ppc64le host.  It *does* support -mbig-endian, but not -m32.

At least gcc11 as release was not biarch, with no special configure arguments.  I can try upgrading to the current gcc12 release to see if that changed...

Ok, yesterday I had tested with RHEL and there the ppc64le compiler is bi-arch and bi-endian, but multilibs are disabled. So it cannot build 32-bit hosted binaries like those for tests/tcg, only freestanding binaries (vof).

On the other hand the powerpc64-linux-gnu-gcc binary from the cross-gcc package is theoretically multilib-friendly, but it cannot find the CRT files on the host because they are not in the .../le multilib subdirectory.

The simplest way out is to just test both native and cross. There is already code to check for a working compiler in the tests/tcg stanza, and it can be moved to probe_target_compiler.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]