[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/24] configure: cleanup $cpu tests
From: |
Paolo Bonzini |
Subject: |
[PULL 09/24] configure: cleanup $cpu tests |
Date: |
Wed, 21 Dec 2022 19:01:26 +0100 |
$cpu is derived from preprocessor defines rather than uname these days,
so do not bother using isainfo on Solaris. Likewise do not recognize
BeOS's uname -m output.
Keep the other, less OS-specific canonicalizations for the benefit
of people using --cpu.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index 543fd5a48bf0..9cbbeaa269d1 100755
--- a/configure
+++ b/configure
@@ -337,9 +337,6 @@ for opt do
;;
esac
done
-# OS specific
-# Using uname is really, really broken. Once we have the right set of checks
-# we can eliminate its usage altogether.
# Preferred compiler:
# ${CC} (if set)
@@ -489,13 +486,6 @@ sunos)
QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
# needed for TIOCWIN* defines in termios.h
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
- # $(uname -m) returns i86pc even on an x86_64 box, so default based on
isainfo
- # Note that this check is broken for cross-compilation: if you're
- # cross-compiling to one of these OSes then you'll need to specify
- # the correct CPU with the --cpu option.
- if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
- cpu="x86_64"
- fi
;;
haiku)
pie="no"
@@ -550,16 +540,21 @@ elif check_define __aarch64__ ; then
elif check_define __loongarch64 ; then
cpu="loongarch64"
else
+ # Using uname is really broken, but it is just a fallback for architectures
+ # that are going to use TCI anyway
cpu=$(uname -m)
+ echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output
'$cpu'"
fi
-# Normalise host CPU name, set multilib cflags
+# Normalise host CPU name and set multilib cflags. The canonicalization
+# isn't really necessary, because the architectures that we check for
+# should not hit the 'uname -m' case, but better safe than sorry.
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
armv*b|armv*l|arm)
cpu="arm" ;;
- i386|i486|i586|i686|i86pc|BePC)
+ i386|i486|i586|i686)
cpu="i386"
CPU_CFLAGS="-m32" ;;
x32)
--
2.38.1
- [PULL 03/24] util/log: do not close and reopen log files when flags are turned off, (continued)
- [PULL 03/24] util/log: do not close and reopen log files when flags are turned off, Paolo Bonzini, 2022/12/21
- [PULL 01/24] typedefs: Forward-declare AccelState, Paolo Bonzini, 2022/12/21
- [PULL 04/24] util/log: Always send errors to logfile when daemonized, Paolo Bonzini, 2022/12/21
- [PULL 05/24] ide: Add 8-bit data mode, Paolo Bonzini, 2022/12/21
- [PULL 06/24] ide: Add "ide-cf" driver, a CompactFlash card, Paolo Bonzini, 2022/12/21
- [PULL 08/24] configure: remove dead function, Paolo Bonzini, 2022/12/21
- [PULL 10/24] configure: preserve qemu-ga variables, Paolo Bonzini, 2022/12/21
- [PULL 02/24] hw: Reduce "qemu/accel.h" inclusion, Paolo Bonzini, 2022/12/21
- [PULL 07/24] configure: remove useless write_c_skeleton, Paolo Bonzini, 2022/12/21
- [PULL 11/24] configure: remove backwards-compatibility and obsolete options, Paolo Bonzini, 2022/12/21
- [PULL 09/24] configure: cleanup $cpu tests,
Paolo Bonzini <=
- [PULL 12/24] meson: tweak hardening options for Windows, Paolo Bonzini, 2022/12/21
- [PULL 13/24] meson: cleanup dummy-cpus.c rules, Paolo Bonzini, 2022/12/21
- [PULL 14/24] tests/qapi-schema: remove Meson workaround, Paolo Bonzini, 2022/12/21
- [PULL 15/24] configure: test all warnings, Paolo Bonzini, 2022/12/21
- [PULL 16/24] meson: support meson 0.64 -Doptimization=plain, Paolo Bonzini, 2022/12/21
- [PULL 17/24] meson: cleanup compiler detection, Paolo Bonzini, 2022/12/21
- [PULL 19/24] docs: do not talk about past removal as happening in the future, Paolo Bonzini, 2022/12/21
- [PULL 21/24] util: remove support for hex numbers with a scaling suffix, Paolo Bonzini, 2022/12/21
- [PULL 23/24] target/i386: Add SGX aex-notify and EDECCSSA support, Paolo Bonzini, 2022/12/21
- [PULL 20/24] KVM: remove support for kernel-irqchip=off, Paolo Bonzini, 2022/12/21