[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/10] configure: do not set bsd_user/linux_user early
From: |
Paolo Bonzini |
Subject: |
[PATCH 04/10] configure: do not set bsd_user/linux_user early |
Date: |
Thu, 16 Dec 2021 09:51:33 +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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 157691d99e..a774086891 100755
--- a/configure
+++ b/configure
@@ -322,8 +322,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"
@@ -541,7 +541,6 @@ gnu/kfreebsd)
;;
freebsd)
bsd="yes"
- bsd_user="yes"
make="${MAKE-gmake}"
# needed for kinfo_getvmmap(3) in libutil.h
;;
@@ -586,7 +585,6 @@ haiku)
;;
linux)
linux="yes"
- linux_user="yes"
vhost_user=${default_feature:-yes}
;;
esac
@@ -1280,18 +1278,25 @@ 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 [ -d $source_path/bsd-user/$targetos ]; then
+ bsd_user=yes
+ elif [ "$bsd_user" = yes ]; 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
- [PATCH 02/10] configure: make $targetos lowercase, use windows instead of MINGW32, (continued)
- [PATCH 02/10] configure: make $targetos lowercase, use windows instead of MINGW32, Paolo Bonzini, 2021/12/16
- [PATCH 01/10] configure: simplify creation of plugin symbol list, Paolo Bonzini, 2021/12/16
- [PATCH 03/10] configure: move target detection before CPU detection, Paolo Bonzini, 2021/12/16
- [PATCH 06/10] configure: unify ppc64 and ppc64le, Paolo Bonzini, 2021/12/16
- [PATCH 10/10] configure: remove unnecessary symlinks, Paolo Bonzini, 2021/12/16
- [PATCH 04/10] configure: do not set bsd_user/linux_user early,
Paolo Bonzini <=
- [PATCH 09/10] configure, meson: move ARCH to meson.build, Paolo Bonzini, 2021/12/16
- [PATCH 05/10] configure: unify two case statements on $cpu, Paolo Bonzini, 2021/12/16
- [PATCH 08/10] meson: rename "arch" variable, Paolo Bonzini, 2021/12/16
- [PATCH 07/10] configure: unify x86_64 and x32, Paolo Bonzini, 2021/12/16