From nobody Sun Nov 16 16:27:25 2025 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=1600853206; cv=none; d=zohomail.com; s=zohoarc; b=NFUz6eEYFwhRMlOUKx+P5CeQvtFW+Bd+vhxvC8D2EwARVJKz0t3NPWoorDPpjxUTjG2BxSpTkqWA1wK72B27ZUIWOokiibNAzyXlFhLTJeYmaY5n5qnlq7U2m7JNmMuHvlpm2uMnn+QeTYidGLuARuGB/JACDxSyN24/Simxnug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600853206; h=Content-Type:Content-Transfer-Encoding:Cc: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=qRuenM6xg1JBEEE11oXj+Vx3RalsCmbiYZ8kHQa3v2A=; b=arVrNHuphOlXY2E31z76bSnCbNLG7EjC48+UZ+htBztb1P8yahTTFnxZ8Rxtafk82lM8XOQbZ3VOy/VvFehHR4j14f4tG+M+k1iUnE2IVG4WDySMXkfUNXwRXYxH7UssNH7BvwYdSPOOHi/AwefyPxddnwnErvKMFJYyH/V18/k= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600853206746749.791490037814; Wed, 23 Sep 2020 02:26:46 -0700 (PDT) Received: from localhost ([::1]:37490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL12z-0002DG-DX for importer@patchew.org; Wed, 23 Sep 2020 05:26:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL0oc-0001G0-HP for qemu-devel@nongnu.org; Wed, 23 Sep 2020 05:11:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kL0oS-0002N9-K2 for qemu-devel@nongnu.org; Wed, 23 Sep 2020 05:11:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-RDL2NQNfOiWn7dgtffhP1Q-1; Wed, 23 Sep 2020 05:11:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9A1441074641; Wed, 23 Sep 2020 09:11:35 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F3945D9CC; Wed, 23 Sep 2020 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600852300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qRuenM6xg1JBEEE11oXj+Vx3RalsCmbiYZ8kHQa3v2A=; b=N/pXmZHn/oEFxdOKIeRrh7XgVZ5s5EPx9P37RjsttfambsfXVDZcJAUgx2/UfF4xlYj4R3 v46acubBFsiJQDO7gMB+WqcEploKlLEejtB9LejmUKLlLqiaWzp8hPtoGKPs9/NKOfiy1L awSzHgwTLQs9mdNeaDwVI+2sQ/a3Kik= X-MC-Unique: RDL2NQNfOiWn7dgtffhP1Q-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/12] configure: compute derivatives of target name in meson Date: Wed, 23 Sep 2020 05:11:25 -0400 Message-Id: <20200923091131.1591563-7-pbonzini@redhat.com> In-Reply-To: <20200923091131.1591563-1-pbonzini@redhat.com> References: <20200923091131.1591563-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/23 00:53:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.henderson@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Several CONFIG_* symbols in config-target.mak are easily computed from just the target name. We do not need them in config-target.mak, and can instead place them in the config_target dictionary only. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- configure | 11 +---------- meson.build | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 903bbcbc46..2bd4336369 100755 --- a/configure +++ b/configure @@ -7622,7 +7622,6 @@ upper() { =20 target_arch_name=3D"$(upper $TARGET_ARCH)" echo "TARGET_$target_arch_name=3Dy" >> $config_target_mak -echo "TARGET_NAME=3D$target_name" >> $config_target_mak echo "TARGET_BASE_ARCH=3D$TARGET_BASE_ARCH" >> $config_target_mak if [ "$TARGET_ABI_DIR" =3D "" ]; then TARGET_ABI_DIR=3D$TARGET_ARCH @@ -7640,21 +7639,15 @@ if test "$target_bigendian" =3D "yes" ; then echo "TARGET_WORDS_BIGENDIAN=3Dy" >> $config_target_mak fi if test "$target_softmmu" =3D "yes" ; then - echo "CONFIG_SOFTMMU=3Dy" >> $config_target_mak if test "$mttcg" =3D "yes" ; then echo "TARGET_SUPPORTS_MTTCG=3Dy" >> $config_target_mak fi fi if test "$target_user_only" =3D "yes" ; then - echo "CONFIG_USER_ONLY=3Dy" >> $config_target_mak - echo "CONFIG_QEMU_INTERP_PREFIX=3D\"$interp_prefix1\"" >> $config_target= _mak symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" else symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_n= ame" fi -if test "$target_linux_user" =3D "yes" ; then - echo "CONFIG_LINUX_USER=3Dy" >> $config_target_mak -fi list=3D"" if test ! -z "$gdb_xml_files" ; then for x in $gdb_xml_files; do @@ -7666,9 +7659,6 @@ fi if test "$target_user_only" =3D "yes" && test "$bflt" =3D "yes"; then echo "TARGET_HAS_BFLT=3Dy" >> $config_target_mak fi -if test "$target_bsd_user" =3D "yes" ; then - echo "CONFIG_BSD_USER=3Dy" >> $config_target_mak -fi =20 done # for target in $targets =20 @@ -7678,6 +7668,7 @@ fi if [ "$capstone" =3D "git" -o "$capstone" =3D "internal" ]; then subdirs=3D"$subdirs capstone" fi +echo "CONFIG_QEMU_INTERP_PREFIX=3D$interp_prefix" | sed 's/%M/@0@/' >> $co= nfig_host_mak echo "SUBDIRS=3D$subdirs" >> $config_host_mak if test -n "$LIBCAPSTONE"; then echo "LIBCAPSTONE=3D$LIBCAPSTONE" >> $config_host_mak diff --git a/meson.build b/meson.build index 641378c1d9..3bd8cbacb7 100644 --- a/meson.build +++ b/meson.build @@ -638,12 +638,15 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.proj= ect_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('= .')[2]) =20 +ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] strings =3D ['HOST_DSOSUF', 'CONFIG_IASL', 'bindir', 'prefix', 'qemu_confd= ir', 'qemu_datadir', 'qemu_moddir', 'qemu_localstatedir', 'qemu_helperdir', 'qemu_lo= caledir', 'qemu_icondir', 'qemu_desktopdir', 'qemu_firmwarepath', 'syscon= fdir'] foreach k, v: config_host - if arrays.contains(k) + if ignored.contains(k) + # do nothing + elif arrays.contains(k) if v !=3D '' v =3D '"' + '", "'.join(v.split()) + '", ' endif @@ -719,7 +722,23 @@ kconfig_external_symbols =3D [ ignored =3D ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS'] =20 foreach target : target_dirs - config_target =3D keyval.load(meson.current_build_dir() / target / 'conf= ig-target.mak') + config_target =3D { 'TARGET_NAME': target.split('-')[0] } + if target.endswith('linux-user') + assert(targetos =3D=3D 'linux') + config_target +=3D { 'CONFIG_LINUX_USER': 'y' } + elif target.endswith('bsd-user') + assert('CONFIG_BSD' in config_host) + config_target +=3D { 'CONFIG_BSD_USER': 'y' } + elif target.endswith('softmmu') + config_target +=3D { 'CONFIG_SOFTMMU': 'y' } + endif + if target.endswith('-user') + config_target +=3D { + 'CONFIG_USER_ONLY': 'y', + 'CONFIG_QEMU_INTERP_PREFIX': + config_host['CONFIG_QEMU_INTERP_PREFIX'].format(config_target['TAR= GET_NAME']) + } + endif =20 have_accel =3D false foreach sym: accelerators @@ -734,6 +753,8 @@ foreach target : target_dirs endforeach assert(have_accel) =20 + config_target +=3D keyval.load('default-configs/targets' / target + '.ma= k') + foreach k, v: disassemblers if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARC= H'].startswith(k) foreach sym: v @@ -751,7 +772,7 @@ foreach target : target_dirs # do nothing elif k =3D=3D 'TARGET_BASE_ARCH' config_target_data.set('TARGET_' + v.to_upper(), 1) - elif k =3D=3D 'TARGET_NAME' + elif k =3D=3D 'TARGET_NAME' or k =3D=3D 'CONFIG_QEMU_INTERP_PREFIX' config_target_data.set_quoted(k, v) elif v =3D=3D 'y' config_target_data.set(k, 1) --=20 2.26.2