From nobody Mon Feb 9 09:52:45 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=1592483954; cv=none; d=zohomail.com; s=zohoarc; b=TQxBVRdAH49XYkJkPt0u5Zr9eFf6WGivz5XowqCNC8es9+DHgp1ZEjJfEpaPaSVdNvVoF4ee4M+3MK+Wvq9yn0JQFBJxPjXj96149WxUPsOCvx3cIeV0XqlNFWEGGoEw7M4lZlPFWIHOWgYsZFm4z8q70XG3UuIYQarBTd4LpSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592483954; 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=qGm35NS9TNX7NuxVc5/FgVKm25dd/CU0oP9YFDrfAng=; b=EqeAdS5ISWveMNP2F6EDr0z8hw7Ix20LFx5wLpShfFQERKnoqg6qwTQRK/5wjGMiYc9Y9BMqv2hLPpwIhU9CxaNr0mMSjhtRKbSi6LFBF5RvgIl7J5I2z4hIVvMVbxx4h4PqkQeBXrSvOInZSNLEhyR438DE6+rbe5FzHLmPptM= 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 1592483954878546.4358935457908; Thu, 18 Jun 2020 05:39:14 -0700 (PDT) Received: from localhost ([::1]:38894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jltp3-0005Ui-MU for importer@patchew.org; Thu, 18 Jun 2020 08:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jltkB-0004Om-QM for qemu-devel@nongnu.org; Thu, 18 Jun 2020 08:34:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27904 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 1jltkA-0004mI-3v for qemu-devel@nongnu.org; Thu, 18 Jun 2020 08:34:11 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-gbxQFzL4PiGlBvycm5HSpA-1; Thu, 18 Jun 2020 08:34:05 -0400 Received: by mail-wr1-f69.google.com with SMTP id w4so2750760wrl.13 for ; Thu, 18 Jun 2020 05:34:05 -0700 (PDT) Received: from localhost.localdomain (93.red-83-59-160.dynamicip.rima-tde.net. [83.59.160.93]) by smtp.gmail.com with ESMTPSA id j14sm3465557wrs.75.2020.06.18.05.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 05:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592483649; 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=qGm35NS9TNX7NuxVc5/FgVKm25dd/CU0oP9YFDrfAng=; b=SuMfU9lrBTBjHT28wHKPxuZLINzsCr+V5yYm6e1tF9J6zhgZgTH0j2kyNDkzSuf07CNQeF SyChXAUsBLPP7yNs/rchEUdzzXN9qHzZj7TY9hHAYg4Z/EKiZ/oMqA9jdzLZ1eZHYLqona rr5tEc/uRr94iZilG69ZSw6+CkwBegU= X-MC-Unique: gbxQFzL4PiGlBvycm5HSpA-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=qGm35NS9TNX7NuxVc5/FgVKm25dd/CU0oP9YFDrfAng=; b=ozbRlJ1QF+2KI40h8/MuxBKP+Mmy2CEWTxn0F1Q6pT0ayuxUoUxd2rHYDTWyO7ioIO 5SkCRw53GwiiC1vd4r4hxQMtQHK1cUAxoipTEcV+ciEBnF2Z2SzXz6Wqmk03DGwGmC3v 03B9YlqT5xSwn1EXOryLT6Uig+vEvMGbrsPM0rGRYl2RsEA69Kx+W9KUmPJ3pE8gojGZ +DpGHm7TdiECZ4nRIfD74Ijlcli+UphmiwJfyo0qkp0om5UUA4BE497Wi+8puSsJJleK H9OMiNoyWcns2DqC/ZhgbAzUr+/tHH0FDS+ohRC+m2tmhFsIl2TWwoCnMRbRasw1vE6T zAjQ== X-Gm-Message-State: AOAM530tJC09Nyq9uBZxFqvkBUN8RzT2j4pwv6iBq8C4kURqi+kRuTRP 3hVZ1EQxJ+/ZB/fUXpw7EU4sAQcPnUIvFfWfUJYv3T48LCdnNOyByoqwt2zoz4dRak1/JPRDCzW Z+tlMHrZgJd5I+zc= X-Received: by 2002:a05:6000:10cf:: with SMTP id b15mr4335089wrx.214.1592483643968; Thu, 18 Jun 2020 05:34:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw71Y5QCb+2TRfiq3gVG0S5v4Pewe7HyoiaGE+3scgR8fl+iA9L6r+2Ovj/9LN8zdKl55a6/w== X-Received: by 2002:a05:6000:10cf:: with SMTP id b15mr4335066wrx.214.1592483643748; Thu, 18 Jun 2020 05:34:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Date: Thu, 18 Jun 2020 14:33:36 +0200 Message-Id: <20200618123342.10693-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200618123342.10693-1-philmd@redhat.com> References: <20200618123342.10693-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/18 01:21:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index ba88fd1824..c0d7fbc30e 100755 --- a/configure +++ b/configure @@ -7927,6 +7927,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 @@ -8155,6 +8157,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 @@ -8370,6 +8373,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