From nobody Tue Feb 10 15:45:40 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639645157; cv=none; d=zohomail.com; s=zohoarc; b=JZMeSL93b1/Zmn8uQV+Nz7KVEF9jzvSsI7E57j2HB5M56+rdV81N2p/7gVBDvRynTQ4Je+ELXBHTgoQFy39uOhPdqtCgbmQt4AlKFJkdhpgEb/kvaVTrDo6FogkH/L8YjIVSK3jJhgz1kwjsr/d4D6Lii9G6RSYbrDrwMIcbE/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639645157; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ko7yDuy6KoAvLgHZ93uKWo0PSnLIVZJ7746abDOnL/I=; b=jPErc1dVVzZoX1VRa4hA/7C7nl51/wvECp6DvRpiNFiwZPEuULEymLqpbeZoPgjPP7pI3LklPbXWpG7c7DbyoFE0rNArxucYn69AxyW6CHfR+upA0zW2Vz5YMNbjsiKqWnDHRaNS7+hfwoogFt7wXAppi7O4DdNmoKfy6/+reqk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163964515715660.510685680619645; Thu, 16 Dec 2021 00:59:17 -0800 (PST) Received: from localhost ([::1]:43276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxmbc-0004zz-52 for importer@patchew.org; Thu, 16 Dec 2021 03:59:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUP-0000aO-DH for qemu-devel@nongnu.org; Thu, 16 Dec 2021 03:51:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUN-0004A4-29 for qemu-devel@nongnu.org; Thu, 16 Dec 2021 03:51:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-412-_h8d9WDSP_mHCX9A_DizwQ-1; Thu, 16 Dec 2021 03:51:45 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 70EC1801AAB for ; Thu, 16 Dec 2021 08:51:44 +0000 (UTC) Received: from avogadro.mxp.redhat.com (unknown [10.39.194.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2E3B2C1AB for ; Thu, 16 Dec 2021 08:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639644706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ko7yDuy6KoAvLgHZ93uKWo0PSnLIVZJ7746abDOnL/I=; b=CtzZWevvJ07jVdJS8SKRduXzN8EdqYX2ZUlQkS77mBiFbqi9fQRIxkOPVSR/Z0oLEu7BET LWNmxH4zhKQhAT73sIKnxmtryaoFlIwRf1+NTqRBUcGiemzu4L58q6+7p9mIl+x73ow/BO eo84kOMJ97paUHXRYRewzEI5O42/fIc= X-MC-Unique: _h8d9WDSP_mHCX9A_DizwQ-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/10] configure: do not set bsd_user/linux_user early Date: Thu, 16 Dec 2021 09:51:33 +0100 Message-Id: <20211216085139.99682-5-pbonzini@redhat.com> In-Reply-To: <20211216085139.99682-1-pbonzini@redhat.com> References: <20211216085139.99682-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.718, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639645159292100001 Content-Type: text/plain; charset="utf-8" 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-use= r. 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 --- 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=3D"no" solaris=3D"no" profiler=3D"no" softmmu=3D"yes" -linux_user=3D"no" -bsd_user=3D"no" +linux_user=3D"" +bsd_user=3D"" pkgversion=3D"" pie=3D"" qom_cast_debug=3D"yes" @@ -541,7 +541,6 @@ gnu/kfreebsd) ;; freebsd) bsd=3D"yes" - bsd_user=3D"yes" make=3D"${MAKE-gmake}" # needed for kinfo_getvmmap(3) in libutil.h ;; @@ -586,7 +585,6 @@ haiku) ;; linux) linux=3D"yes" - linux_user=3D"yes" vhost_user=3D${default_feature:-yes} ;; esac @@ -1280,18 +1278,25 @@ if eval test -z "\${cross_cc_$cpu}"; then cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" fi =20 -# For user-mode emulation the host arch has to be one we explicitly -# support, even if we're using TCI. -if [ "$ARCH" =3D "unknown" ]; then - bsd_user=3D"no" - linux_user=3D"no" -fi - default_target_list=3D"" deprecated_targets_list=3Dppc64abi32-linux-user deprecated_features=3D"" mak_wilds=3D"" =20 +if [ "$linux_user" !=3D no ]; then + if [ "$targetos" =3D linux ] && [ -d $source_path/linux-user/host/$cpu= ]; then + linux_user=3Dyes + elif [ "$linux_user" =3D yes ]; then + error_exit "linux-user not supported on this architecture" + fi +fi +if [ "$bsd_user" !=3D no ]; then + if [ -d $source_path/bsd-user/$targetos ]; then + bsd_user=3Dyes + elif [ "$bsd_user" =3D yes ]; then + error_exit "bsd-user not supported on this host OS" + fi +fi if [ "$softmmu" =3D "yes" ]; then mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-softmmu.mak" fi --=20 2.33.1