qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/10] configure: do not set bsd_user/linux_user early


From: Paolo Bonzini
Subject: Re: [PATCH 04/10] configure: do not set bsd_user/linux_user early
Date: Sat, 18 Dec 2021 11:16:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 12/17/21 21:49, Richard Henderson wrote:
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.

It's replaced by checking for bsd-user/$targetos but yes, that would
flip the default for netbsd and openbsd.

A better condition is

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

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]