From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
Date: Fri, 19 Jun 2020 13:08:38 +0200 [thread overview]
Message-ID: <725623ba-67e4-0732-49ae-9bb38d2d6782@redhat.com> (raw)
In-Reply-To: <20200618123342.10693-5-philmd@redhat.com>
On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
> From: Alex Bennée <alex.bennee@linaro.org>
>
> 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ée <alex.bennee@linaro.org>
I'm not sure it is implicit by the S-o-b tag following, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> 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" = "yes" ; then
> fi
> fi
>
> +target_to_base_map=""
> +
> for target in $target_list; do
> target_dir="$target"
> config_target_mak=$target_dir/config-target.mak
> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
> echo "TARGET_$target_arch_name=y" >> $config_target_mak
> echo "TARGET_NAME=$target_name" >> $config_target_mak
> echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
> if [ "$TARGET_ABI_DIR" = "" ]; then
> TARGET_ABI_DIR=$TARGET_ARCH
> fi
> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
> echo "export CCACHE_CPP2=y" >> $config_host_mak
> fi
>
> +# 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'" >> $config_host_mak
> +echo "base-arch = \$(strip \\" >> $config_host_mak
> +close_braces=""
> +for pairs in $target_to_base_map
> +do
> + dir="${pairs%%,*}"
> + base="${pairs#*,}"
> + echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
> + close_braces="$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
>
next prev parent reply other threads:[~2020-06-19 11:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 02/10] MAINTAINERS: Add an 'overall' entry for accelerators Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub Philippe Mathieu-Daudé
2020-06-22 16:47 ` Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
2020-06-19 11:08 ` Philippe Mathieu-Daudé [this message]
2020-06-23 8:01 ` Claudio Fontana
2020-06-23 8:45 ` Philippe Mathieu-Daudé
2020-06-23 13:17 ` Philippe Mathieu-Daudé
2020-06-25 8:45 ` Claudio Fontana
2020-06-18 12:33 ` [PATCH v9 05/10] Makefile: Remove dangerous EOL trailing backslash Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 06/10] Makefile: Write MINIKCONF variables as one entry per line Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 07/10] accel/Kconfig: Extract accel selectors into their own config Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 08/10] accel/Kconfig: Add the TCG selector Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 09/10] Makefile: Allow target-specific optional Kconfig Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 10/10] accel/tcg: Add stub for probe_access() Philippe Mathieu-Daudé
2020-06-18 13:28 ` [PATCH v9 00/10] accel: Allow targets to use Kconfig no-reply
2020-06-22 16:47 ` Philippe Mathieu-Daudé
2020-06-25 7:49 ` Philippe Mathieu-Daudé
2020-06-25 10:20 ` Paolo Bonzini
2020-06-25 10:22 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=725623ba-67e4-0732-49ae-9bb38d2d6782@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).