From nobody Tue Feb 10 09:57: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=1639644964; cv=none; d=zohomail.com; s=zohoarc; b=WFi/CiAPDeiOM0JU0KiP3zinna6KnE0nP9FuDRy+txpssRStgdJefcrslbmtYOmQ11eOXvZCrYFpWLm6zuMa9BKNS0wYrMFog/JM4yA2+hWwGZwrLs/p8uEMuaSLNH9w/uyJdIG3LZYUZCBIS3ASrJx6cjbNcECDUNxzr2m/BF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639644964; 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=116wCfArOU87fwTJbit/Ib4jMlT4uME8m7V4T1JMkZI=; b=Z36RGbv6XlZujTLF5jJSA8puEb6vZg+Etp3D+D+7T5Nh/xTXDcaANEqZoQ5LKrNx0cUaVtGUn2yYDcYN926dGgRkJ0bZ8n3l8NIIzPJ3pKNUTnjexTZxLzkwvfg9/0/FfEnbV3SryTTRHUta9G9nYUU3KrPJTHsg7E+ka+RHUP8= 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 16396449646191017.6070940233466; Thu, 16 Dec 2021 00:56:04 -0800 (PST) Received: from localhost ([::1]:34048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxmYV-00074b-H7 for importer@patchew.org; Thu, 16 Dec 2021 03:56:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUV-0000fe-8f for qemu-devel@nongnu.org; Thu, 16 Dec 2021 03:51:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:25638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmUS-0004CN-6x for qemu-devel@nongnu.org; Thu, 16 Dec 2021 03:51:54 -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-517-LLJMRZCiMKuLw3Ixq5XCuQ-1; Thu, 16 Dec 2021 03:51:50 -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 1AF20801AAB for ; Thu, 16 Dec 2021 08:51:49 +0000 (UTC) Received: from avogadro.mxp.redhat.com (unknown [10.39.194.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F9642BE77 for ; Thu, 16 Dec 2021 08:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639644711; 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=116wCfArOU87fwTJbit/Ib4jMlT4uME8m7V4T1JMkZI=; b=he1tt1w0OXpR1Q5CU8XSsF3M3DiOZTQ2QbeIBi7Qp2EKSsb15DFcKjPkiHmMuDpEsBIp9g 7VXbXeP/zN0SbjudghkdGp0xn/Jsp2ZIwO6+ZgXhjwt2nFt2XZnTTcq39L1TA0tv59Nmw3 DEtXUVaMu86nc1SxxMODBZQsLnPxM4o= X-MC-Unique: LLJMRZCiMKuLw3Ixq5XCuQ-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/10] configure, meson: move ARCH to meson.build Date: Thu, 16 Dec 2021 09:51:38 +0100 Message-Id: <20211216085139.99682-10-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: 1639644966557100001 Content-Type: text/plain; charset="utf-8" $ARCH and the HOST_* symbols are only used by the QEMU build; configure uses $cpu instead. Remove it from config-host.mak. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- configure | 21 ++++----------------- meson.build | 26 +++++++++++++++++--------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/configure b/configure index 741c33c7ad..2cecbd4c66 100755 --- a/configure +++ b/configure @@ -634,11 +634,9 @@ else cpu=3D$(uname -m) fi =20 -ARCH=3D -# Normalise host CPU name, set ARCH and multilib cflags +# Normalise host CPU name, set multilib cflags # Note that this case should only have supported host CPUs, not guests. case "$cpu" in - aarch64|riscv) ;; armv*b|armv*l|arm) cpu=3D"arm" ;; =20 @@ -667,8 +665,7 @@ case "$cpu" in CPU_CFLAGS=3D"-m64 -mlittle" ;; =20 s390) - CPU_CFLAGS=3D"-m31" - ARCH=3Dunknown ;; + CPU_CFLAGS=3D"-m31" ;; s390x) CPU_CFLAGS=3D"-m64" ;; =20 @@ -677,15 +674,7 @@ case "$cpu" in CPU_CFLAGS=3D"-m32 -mv8plus -mcpu=3Dultrasparc" ;; sparc64) CPU_CFLAGS=3D"-m64 -mcpu=3Dultrasparc" ;; - - *) - # This will result in either an error or falling back to TCI later - ARCH=3Dunknown - ;; esac -if test -z "$ARCH"; then - ARCH=3D"$cpu" -fi =20 : ${make=3D${MAKE-make}} =20 @@ -3432,8 +3421,6 @@ echo "GIT=3D$git" >> $config_host_mak echo "GIT_SUBMODULES=3D$git_submodules" >> $config_host_mak echo "GIT_SUBMODULES_ACTION=3D$git_submodules_action" >> $config_host_mak =20 -echo "ARCH=3D$ARCH" >> $config_host_mak - if test "$debug_tcg" =3D "yes" ; then echo "CONFIG_DEBUG_TCG=3Dy" >> $config_host_mak fi @@ -3914,12 +3901,12 @@ if test "$skip_meson" =3D no; then cross_arg=3D"--cross-file config-meson.cross" echo "[host_machine]" >> $cross echo "system =3D '$targetos'" >> $cross - case "$ARCH" in + case "$cpu" in i386) echo "cpu_family =3D 'x86'" >> $cross ;; *) - echo "cpu_family =3D '$ARCH'" >> $cross + echo "cpu_family =3D '$cpu'" >> $cross ;; esac echo "cpu =3D '$cpu'" >> $cross diff --git a/meson.build b/meson.build index 677ab1b57d..93f296e283 100644 --- a/meson.build +++ b/meson.build @@ -67,6 +67,14 @@ endif =20 targetos =3D host_machine.system() =20 +if cpu not in supported_cpus + host_arch =3D 'unknown' +elif cpu =3D=3D 'x86' + host_arch =3D 'i386' +else + host_arch =3D cpu +endif + if cpu in ['x86', 'x86_64'] kvm_targets =3D ['i386-softmmu', 'x86_64-softmmu'] elif cpu =3D=3D 'aarch64' @@ -335,9 +343,9 @@ if targetos =3D=3D 'netbsd' endif endif =20 -tcg_arch =3D config_host['ARCH'] +tcg_arch =3D host_arch if not get_option('tcg').disabled() - if cpu not in supported_cpus + if host_arch =3D=3D 'unknown' if get_option('tcg_interpreter') warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(c= pu)) else @@ -353,11 +361,11 @@ if not get_option('tcg').disabled() endif if get_option('tcg_interpreter') tcg_arch =3D 'tci' - elif config_host['ARCH'] =3D=3D 'sparc64' + elif host_arch =3D=3D 'sparc64' tcg_arch =3D 'sparc' - elif config_host['ARCH'] =3D=3D 'x86_64' + elif host_arch =3D=3D 'x86_64' tcg_arch =3D 'i386' - elif config_host['ARCH'] =3D=3D 'ppc64' + elif host_arch =3D=3D 'ppc64' tcg_arch =3D 'ppc' endif add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tc= g_arch, @@ -1422,6 +1430,8 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDI= R', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / q= emu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / ge= t_option('sysconfdir')) =20 +config_host_data.set('HOST_' + host_arch.to_upper(), 1) + config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) @@ -1770,8 +1780,6 @@ foreach k, v: config_host v =3D '"' + '", "'.join(v.split()) + '", ' endif config_host_data.set(k, v) - elif k =3D=3D 'ARCH' - config_host_data.set('HOST_' + v.to_upper(), 1) elif strings.contains(k) config_host_data.set_quoted(k, v) elif k.startswith('CONFIG_') @@ -1914,7 +1922,7 @@ foreach target : target_dirs endif =20 foreach k, v: disassemblers - if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARC= H'].startswith(k) + if host_arch.startswith(k) or config_target['TARGET_BASE_ARCH'].starts= with(k) foreach sym: v config_target +=3D { sym: 'y' } config_all_disas +=3D { sym: 'y' } @@ -2883,7 +2891,7 @@ foreach target : target_dirs endif if 'CONFIG_LINUX_USER' in config_target base_dir =3D 'linux-user' - target_inc +=3D include_directories('linux-user/host/' / config_host= ['ARCH']) + target_inc +=3D include_directories('linux-user/host/' / host_arch) endif if 'CONFIG_BSD_USER' in config_target base_dir =3D 'bsd-user' --=20 2.33.1