]> git.proxmox.com Git - mirror_qemu.git/commit - configure
configure: Never use 'uname' to identify target OS
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 13 Jul 2017 15:15:32 +0000 (16:15 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Jul 2017 14:02:51 +0000 (15:02 +0100)
commit951fedfceeda1b09ac8aa1f5263288b65e13caca
tree4877ae53a8538b1a6d8bae6962ded4125e5810e4
parente4335180d2b40de8a5027030edbcd89aa6557bbc
configure: Never use 'uname' to identify target OS

For a very long time we have used 'uname -s' as our fallback if
we don't identify the target OS using a compiler #define. This
obviously doesn't work for cross-compilation, and we've had
a comment suggesting we fix this in configure for a long time.
Since we now have an exhaustive list of which OSes we can run
on (thanks to commit 898be3e0415 making an unrecognized OS
be a fatal error), we know which ones we're missing.

Add check_define tests for the remaining OSes we support.  The
defines checked are based on ones we already use in the codebase for
identifying the host OS (with the exception of GNU/kFreeBSD).
We can now set bogus_os immediately rather than doing it later.

We leave the comment about uname being bad untouched, since
there is still a use of it for the fallback for unrecognized
host CPU type.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1499958932-23839-1-git-send-email-peter.maydell@linaro.org
configure