[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/15] configure: do not set bsd_user/linux_user early
From: |
Paolo Bonzini |
Subject: |
[PULL 07/15] configure: do not set bsd_user/linux_user early |
Date: |
Thu, 23 Dec 2021 12:51:26 +0100 |
Similar to other optional features, leave the variables empty and compute
the actual value later. Use the existence of include or source directories
to detect whether an OS or CPU supports respectively bsd-user and linux-user.
For now, BSD user-mode emulation is buildable even on TCI-only
architectures. This probably will change once safe signals are
brought over from linux-user.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 0306f0c8bc..6516ec243c 100755
--- a/configure
+++ b/configure
@@ -320,8 +320,8 @@ linux="no"
solaris="no"
profiler="no"
softmmu="yes"
-linux_user="no"
-bsd_user="no"
+linux_user=""
+bsd_user=""
pkgversion=""
pie=""
qom_cast_debug="yes"
@@ -538,7 +538,6 @@ gnu/kfreebsd)
;;
freebsd)
bsd="yes"
- bsd_user="yes"
make="${MAKE-gmake}"
# needed for kinfo_getvmmap(3) in libutil.h
;;
@@ -583,7 +582,6 @@ haiku)
;;
linux)
linux="yes"
- linux_user="yes"
vhost_user=${default_feature:-yes}
;;
esac
@@ -1257,18 +1255,26 @@ if eval test -z "\${cross_cc_$cpu}"; then
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
fi
-# For user-mode emulation the host arch has to be one we explicitly
-# support, even if we're using TCI.
-if [ "$ARCH" = "unknown" ]; then
- bsd_user="no"
- linux_user="no"
-fi
-
default_target_list=""
deprecated_targets_list=ppc64abi32-linux-user
deprecated_features=""
mak_wilds=""
+if [ "$linux_user" != no ]; then
+ if [ "$targetos" = linux ] && [ -d $source_path/linux-user/host/$cpu ];
then
+ linux_user=yes
+ elif [ "$linux_user" = yes ]; then
+ error_exit "linux-user not supported on this architecture"
+ fi
+fi
+if [ "$bsd_user" != no ]; then
+ if [ "$bsd_user" = "" ]; then
+ test $targetos = freebsd && bsd_user=yes
+ fi
+ if [ "$bsd_user" = yes ] && ! [ -d $source_path/bsd-user/$targetos ]; then
+ error_exit "bsd-user not supported on this host OS"
+ fi
+fi
if [ "$softmmu" = "yes" ]; then
mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak"
fi
--
2.33.1
- [PULL 00/15] Build system and KVM changes for 2021-12-23, Paolo Bonzini, 2021/12/23
- [PULL 01/15] docker: include bison in debian-tricore-cross, Paolo Bonzini, 2021/12/23
- [PULL 02/15] meson: reuse common_user_inc when building files specific to user-mode emulators, Paolo Bonzini, 2021/12/23
- [PULL 03/15] user: move common-user includes to a subdirectory of {bsd, linux}-user/, Paolo Bonzini, 2021/12/23
- [PULL 07/15] configure: do not set bsd_user/linux_user early,
Paolo Bonzini <=
- [PULL 06/15] configure: simplify creation of plugin symbol list, Paolo Bonzini, 2021/12/23
- [PULL 10/15] configure: move non-command-line variables away from command-line parsing section, Paolo Bonzini, 2021/12/23
- [PULL 11/15] meson: build contrib/ executables after generated headers, Paolo Bonzini, 2021/12/23
- [PULL 04/15] meson: cleanup common-user/ build, Paolo Bonzini, 2021/12/23
- [PULL 05/15] block/file-posix: Simplify the XFS_IOC_DIOINFO handling, Paolo Bonzini, 2021/12/23
- [PULL 14/15] KVM: use KVM_{GET|SET}_SREGS2 when supported., Paolo Bonzini, 2021/12/23
- [PULL 09/15] configure: parse --enable/--disable-strip automatically, flip default, Paolo Bonzini, 2021/12/23
- [PULL 08/15] configure, makefile: remove traces of really old files, Paolo Bonzini, 2021/12/23
- [PULL 15/15] KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS, Paolo Bonzini, 2021/12/23
- [PULL 13/15] meson: add comments in the target-specific flags section, Paolo Bonzini, 2021/12/23