From nobody Mon Feb 9 09:43:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591634605; cv=none; d=zohomail.com; s=zohoarc; b=lcVQ6PIQyStGnST5lXxHeBxJKhGJon8Uoj3eOiLBEow4sYfwbpIl1EbzIjZNLpAqeTVUwivqhoAM8uik46u95hQqpeMW8BWgOWXA+pbmJGda+MFApmHO1EVIc3udwCutwYJLrfdwQ75R2Xt1yJUmbQ/xfmXH4UjkGtEptZiUB1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591634605; 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=SvhtS3OSMs98c1SpJ0qbWUOWyVxnfYR2isIDLvoIiso=; b=cTz/UfXEWQB0GCUwMVqQCiamnO/JrUazHE6U8lDqf+g84JDEjEn+V5aVB9aQkNjh8mOCDuRXWZjTsCB4g5dAP//ajIoqE2sg7V1UzknCt26i7Siu/bktNdh4oERFFXmpRUsKwzW6uUaRHDWg/UFSrMBxADT2k8K57mwc+J9PvkE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1591634605577640.0742922259269; Mon, 8 Jun 2020 09:43:25 -0700 (PDT) Received: from localhost ([::1]:48932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiKrs-0000Xj-91 for importer@patchew.org; Mon, 08 Jun 2020 12:43:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiKnT-0002j8-PC for qemu-devel@nongnu.org; Mon, 08 Jun 2020 12:38:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:34106 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jiKnS-0005vC-Qt for qemu-devel@nongnu.org; Mon, 08 Jun 2020 12:38:51 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-136-9qoWQVf5PFe3dqOwUJSkgg-1; Mon, 08 Jun 2020 12:38:46 -0400 Received: by mail-wr1-f70.google.com with SMTP id o1so7339496wrm.17 for ; Mon, 08 Jun 2020 09:38:46 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m129sm138261wmf.2.2020.06.08.09.38.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 09:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591634330; 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=SvhtS3OSMs98c1SpJ0qbWUOWyVxnfYR2isIDLvoIiso=; b=Hst0ip2JHR8pDJcOg0h30Tfc4T15serMuyWvdnR2YGXLAS3RMkX2XBl9Yyn1tD+kOzIhMu G5/MoE/QUy66FEODJHF0xCNS305WM1FfeTDRkYDc/8Imf7HF2PDATjOH225/HnmaLLD7QI Gf9QzUvLQFiBkx9hCoSPfD30AIhWa4E= X-MC-Unique: 9qoWQVf5PFe3dqOwUJSkgg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SvhtS3OSMs98c1SpJ0qbWUOWyVxnfYR2isIDLvoIiso=; b=SKv9T8xVV0hmMTXSwWOR/GYgI8XJzSy1s64R1tb0uF93bXj6Q2hF7/KCMQ+ttIbUu1 ToZnqGlUJySDAOpfURlb5tTE1fM8ptjsXojRIuXFWPzHm3iItZe/bYCbjFxfIaMFTSx7 NjVerCuPxZxQ1vwd2pGkJhGo4+N9AiEtNCFD6RO4RbNpk+Z2iXq1/1OInB0cDa3IK8Ww ucf4APHUQrFhOGa9yREOowDj1YkJy/5aP/G9kBUSn94GVWVRqTcGIFypa76OVVHI0Fvk tjaBadwqwCRHBvIPa8XdkJ0EccnXIIlwE4vyPXCtLZNdVvhiX+hddlYapwkVCsWEFd7V dFrw== X-Gm-Message-State: AOAM532TgoNEYVGS+4sy/aTKSLfSc/lJjGGtQXdUbHjE+k1KzYGQEtAu quqjvmlAF3To+UNkQZAN1lLDOYE36bGArqTyjuzIF5ywQIxqAAmCjUmpN+UMtRHixJkzns+Tk0+ uuD0f4GxMjtgFMVw= X-Received: by 2002:a5d:4d0d:: with SMTP id z13mr26120371wrt.220.1591634325075; Mon, 08 Jun 2020 09:38:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylCw9/DaZErOBfQWhGiUWoiZNiMfIBcTAFLa0MnjrUMU0d4T8aYmnNHsossKVFfTSii/OvVA== X-Received: by 2002:a5d:4d0d:: with SMTP id z13mr26120354wrt.220.1591634324858; Mon, 08 Jun 2020 09:38:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v8 04/10] configure: Generate rule to calculate the base architecture of a target Date: Mon, 8 Jun 2020 18:38:17 +0200 Message-Id: <20200608163823.8890-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200608163823.8890-1-philmd@redhat.com> References: <20200608163823.8890-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" 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=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/08 01:05:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alex Benn=C3=A9e As we encode the base architecture in configure.sh, we can emit the base-arch() function into config-host.mak. Signed-off-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 597e909b53..b48eb893f8 100755 --- a/configure +++ b/configure @@ -7756,6 +7756,8 @@ if test "$linux" =3D "yes" ; then fi fi =20 +target_to_base_map=3D"" + for target in $target_list; do target_dir=3D"$target" config_target_mak=3D$target_dir/config-target.mak @@ -7984,6 +7986,7 @@ 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 +target_to_base_map=3D"$target_dir,$TARGET_BASE_ARCH $target_to_base_map" if [ "$TARGET_ABI_DIR" =3D "" ]; then TARGET_ABI_DIR=3D$TARGET_ARCH fi @@ -8199,6 +8202,22 @@ if test "$ccache_cpp2" =3D "yes"; then echo "export CCACHE_CPP2=3Dy" >> $config_host_mak fi =20 +# Export a rule for calculating base arch from target_dir for use by +# the Kconfig generator +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak +echo "# Return the base architecture for a target." >> $config_host_mak +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $conf= ig_host_mak +echo "base-arch =3D \$(strip \\" >> $config_host_mak +close_braces=3D"" +for pairs in $target_to_base_map +do + dir=3D"${pairs%%,*}" + base=3D"${pairs#*,}" + echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak + close_braces=3D"$close_braces )" +done +echo "$close_braces )" >> $config_host_mak + # If we're using a separate build tree, set it up now. # DIRS are directories which we simply mkdir in the build tree; # LINKS are things to symlink back into the source tree --=20 2.21.3