From nobody Tue Feb 10 04:16:47 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=1639645012; cv=none; d=zohomail.com; s=zohoarc; b=USnN57NOvTKsd/NKPPqDSTn9f1cf1vgD5On4EQecG1u25EAr4TVJ7ItoX/vJnMamDW0riigD/NrgIX2Wn9B2UvnZ6Qwqanuv+aMf2Z9mkRB6E1C8rykYIf9Nfh636YYpepDaRch0wWGe7y+ZOVHbGnhEP5JnTc7oUA9CCG5aGaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639645012; 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=MbZGrWDN/p1LbliR2t3XnuEn9XWqFhWjhYi4mSJsbLU=; b=CxxXooVzFP3S3sEzm5JAjgtn3DEMs9Y2oxgHXhJbULikI8hPMpdpqzH2Cbr3jJxRRSDGx3WlA94MHhjx9RZ+VrwCpxyhTYoGto2GXcr/PsIDytAPNXscjkFNya5lZ4ol/RS4Ia/M7KZF5375tHhmvTqG3uCvyq+r9PqkfKX5XKw= 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 1639645012094418.5722609096049; Thu, 16 Dec 2021 00:56:52 -0800 (PST) Received: from localhost ([::1]:36774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxmZH-0000Vb-3I for importer@patchew.org; Thu, 16 Dec 2021 03:56:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUO-0000Zf-PT for qemu-devel@nongnu.org; Thu, 16 Dec 2021 03:51:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:32189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUM-00049Q-HR 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-121-tU7HJXzoNiC3bWljjmNq4A-1; Thu, 16 Dec 2021 03:51:44 -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 9564E5F9EB for ; Thu, 16 Dec 2021 08:51:43 +0000 (UTC) Received: from avogadro.mxp.redhat.com (unknown [10.39.194.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13C8B2C1AB for ; Thu, 16 Dec 2021 08:51:42 +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=MbZGrWDN/p1LbliR2t3XnuEn9XWqFhWjhYi4mSJsbLU=; b=JANobeeNSmSn0YtdcZiD2CU8btskNDW75TvG+wu9yKpoWYA5MJhMZGEILmHn83cOEz/ttv iFv7yM/KDpalMkad3TECoW4Oyn4jqljoA2Md7fjp643aHWiDGHqWpTt5zqsEsb1G79kq4z xTIdUhvlMw2h3n2A/fRnuMMfLDB3+1k= X-MC-Unique: tU7HJXzoNiC3bWljjmNq4A-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/10] configure: move target detection before CPU detection Date: Thu, 16 Dec 2021 09:51:32 +0100 Message-Id: <20211216085139.99682-4-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.129.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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1639645012573100001 Content-Type: text/plain; charset="utf-8" This makes more sense, since target detection can affect CPU detection on Solaris. Signed-off-by: Paolo Bonzini --- configure | 115 ++++++++++++++++++++++++++---------------------------- 1 file changed, 55 insertions(+), 60 deletions(-) diff --git a/configure b/configure index 63438c1900..157691d99e 100755 --- a/configure +++ b/configure @@ -528,16 +528,67 @@ else targetos=3Dbogus fi =20 -# Some host OSes need non-standard checks for which CPU to use. -# Note that these checks are broken for cross-compilation: if you're -# cross-compiling to one of these OSes then you'll need to specify -# the correct CPU with the --cpu option. +# OS specific + case $targetos in +windows) + mingw32=3D"yes" + plugins=3D"no" + pie=3D"no" +;; +gnu/kfreebsd) + bsd=3D"yes" +;; +freebsd) + bsd=3D"yes" + bsd_user=3D"yes" + make=3D"${MAKE-gmake}" + # needed for kinfo_getvmmap(3) in libutil.h +;; +dragonfly) + bsd=3D"yes" + make=3D"${MAKE-gmake}" +;; +netbsd) + bsd=3D"yes" + make=3D"${MAKE-gmake}" +;; +openbsd) + bsd=3D"yes" + make=3D"${MAKE-gmake}" +;; +darwin) + bsd=3D"yes" + darwin=3D"yes" + # Disable attempts to use ObjectiveC features in os/object.h since they + # won't work when we're compiling with gcc as a C compiler. + QEMU_CFLAGS=3D"-DOS_OBJECT_USE_OBJC=3D0 $QEMU_CFLAGS" +;; sunos) + solaris=3D"yes" + make=3D"${MAKE-gmake}" + smbd=3D"${SMBD-/usr/sfw/sbin/smbd}" +# needed for CMSG_ macros in sys/socket.h + QEMU_CFLAGS=3D"-D_XOPEN_SOURCE=3D600 $QEMU_CFLAGS" +# needed for TIOCWIN* defines in termios.h + QEMU_CFLAGS=3D"-D__EXTENSIONS__ $QEMU_CFLAGS" # $(uname -m) returns i86pc even on an x86_64 box, so default based on i= sainfo + # Note that this check is broken for cross-compilation: if you're + # cross-compiling to one of these OSes then you'll need to specify + # the correct CPU with the --cpu option. if test -z "$cpu" && test "$(isainfo -k)" =3D "amd64"; then cpu=3D"x86_64" fi +;; +haiku) + pie=3D"no" + QEMU_CFLAGS=3D"-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_C= FLAGS" +;; +linux) + linux=3D"yes" + linux_user=3D"yes" + vhost_user=3D${default_feature:-yes} +;; esac =20 if test ! -z "$cpu" ; then @@ -621,62 +672,6 @@ if test -z "$ARCH"; then ARCH=3D"$cpu" fi =20 -# OS specific - -case $targetos in -windows) - mingw32=3D"yes" - plugins=3D"no" - pie=3D"no" -;; -gnu/kfreebsd) - bsd=3D"yes" -;; -freebsd) - bsd=3D"yes" - bsd_user=3D"yes" - make=3D"${MAKE-gmake}" - # needed for kinfo_getvmmap(3) in libutil.h -;; -dragonfly) - bsd=3D"yes" - make=3D"${MAKE-gmake}" -;; -netbsd) - bsd=3D"yes" - make=3D"${MAKE-gmake}" -;; -openbsd) - bsd=3D"yes" - make=3D"${MAKE-gmake}" -;; -darwin) - bsd=3D"yes" - darwin=3D"yes" - # Disable attempts to use ObjectiveC features in os/object.h since they - # won't work when we're compiling with gcc as a C compiler. - QEMU_CFLAGS=3D"-DOS_OBJECT_USE_OBJC=3D0 $QEMU_CFLAGS" -;; -sunos) - solaris=3D"yes" - make=3D"${MAKE-gmake}" - smbd=3D"${SMBD-/usr/sfw/sbin/smbd}" -# needed for CMSG_ macros in sys/socket.h - QEMU_CFLAGS=3D"-D_XOPEN_SOURCE=3D600 $QEMU_CFLAGS" -# needed for TIOCWIN* defines in termios.h - QEMU_CFLAGS=3D"-D__EXTENSIONS__ $QEMU_CFLAGS" -;; -haiku) - pie=3D"no" - QEMU_CFLAGS=3D"-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_C= FLAGS" -;; -linux) - linux=3D"yes" - linux_user=3D"yes" - vhost_user=3D${default_feature:-yes} -;; -esac - : ${make=3D${MAKE-make}} =20 # We prefer python 3.x. A bare 'python' is traditionally --=20 2.33.1