]> git.proxmox.com Git - mirror_qemu.git/commit - configure
configure: check $CC available before verifying host CPU
authorDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Thu, 2 Nov 2017 09:09:06 +0000 (07:09 -0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 18 Dec 2017 14:07:02 +0000 (17:07 +0300)
commit9aae6e549d9a05f00315429097705a7beadd2aa4
treef29b01b45c7c71ac659d59158e64df849268977e
parent6b1a756112c35d1243831b81609e321f0ffdaa21
configure: check $CC available before verifying host CPU

When executing 'configure' in a fresh QEMU clone, in a fresh
OS install running in a ppc64le host, this is the error
shown:

-----

../configure --enable-trace-backend=simple --enable-debug
    --target-list=ppc64-softmmu

ERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter

-----

This isn't true, ppc64le host CPU is supported. This happens because,
in a fresh install, we don't have a C compiler to autodetect
the $cpu variable to "ppc64".

This patch moves the CC available check up a bit, just before verifying
the host CPU. This ensures that we bail out with a $CC not available
error instead of unsupported CPU (the host CPU detection without
the compiler wouldn't work properly anyway). It also allows --help to
keep working without a C compiler. With this patch, in the same ppc64le
host without gcc:

$ ../configure --enable-trace-backend=simple --enable-debug
    --target-list=ppc64-softmmu

ERROR: "cc" either does not exist or does not work

$ ../configure --help

Usage: configure [options]
Options: [defaults in brackets after descriptions]

Standard options:
  --help                   print this message
  --prefix=PREFIX          install in PREFIX [/usr/local]
  --interp-prefix=PREFIX   where to find shared libraries, etc.
(...)

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure