On 12/16/21 12:51 AM, Paolo Bonzini wrote:
@@ -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
...
+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
Missing the check for $targetos = freebsd.
This looks like it would enable bsd_user on linux, etc.