08.08.2023 15:03, Paolo Bonzini wrote:
The CPU model has to be canonicalized to what Meson wants in the cross file, to what Linux uses for its asm-$ARCH directories, and to what QEMU uses for its user-mode emulation host/$ARCH directories. Do all three in a single case statement, and check that the Linux and QEMU directories actually exist.At a small cost in repeated lines, this ensures that there are no hidden ordering requirements between the case statements. In particular, commit 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 2023-08-06) broke ppc64le because it assigned host_arch based on a non-canonicalized version of $cpu. Reported-by: Joel Stanley <[email protected]> Fixes: 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 2023-08-06) Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> --- configure | 175 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 102 insertions(+), 73 deletions(-)
Reviewed-by: Michael Tokarev <[email protected]> A nice cleanup. /mjt
