From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, richard.henderson@linaro.org
Subject: [PATCH 3/7] configure: allow more host/target combos to use the host compiler
Date: Tue, 7 Jun 2022 11:40:27 +0200 [thread overview]
Message-ID: <20220607094031.1227714-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20220607094031.1227714-1-pbonzini@redhat.com>
Do not require a cross-compiler prefix for e.g. i386 on x86_64, or
big endian on little endian.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index b1aa97e470..28f8c6188b 100755
--- a/configure
+++ b/configure
@@ -2058,19 +2058,27 @@ probe_target_compiler() {
compute_target_variable $1 target_objcopy objcopy
compute_target_variable $1 target_ranlib ranlib
compute_target_variable $1 target_strip strip
- if test "$1" = $cpu; then
- : ${target_cc:=$cc}
- : ${target_ccas:=$ccas}
- : ${target_as:=$as}
- : ${target_ld:=$ld}
- : ${target_ar:=$ar}
- : ${target_as:=$as}
- : ${target_ld:=$ld}
- : ${target_nm:=$nm}
- : ${target_objcopy:=$objcopy}
- : ${target_ranlib:=$ranlib}
- : ${target_strip:=$strip}
- fi
+ case "$1:$cpu" in
+ aarch64:aarch64_be | aarch64_be:aarch64 | \
+ arm:armeb | armeb:arm | \
+ i386:x86_64 | \
+ ppc:ppc64* | \
+ ppc64*:ppc64* | \
+ sparc:sparc64 | \
+ "$cpu:$cpu")
+ : ${target_cc:=$cc}
+ : ${target_ccas:=$ccas}
+ : ${target_as:=$as}
+ : ${target_ld:=$ld}
+ : ${target_ar:=$ar}
+ : ${target_as:=$as}
+ : ${target_ld:=$ld}
+ : ${target_nm:=$nm}
+ : ${target_objcopy:=$objcopy}
+ : ${target_ranlib:=$ranlib}
+ : ${target_strip:=$strip}
+ ;;
+ esac
if test -n "$target_cc"; then
case $1 in
i386|x86_64)
--
2.36.1
next prev parent reply other threads:[~2022-06-07 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 9:40 [PATCH 0/7] More tests/tcg cleanups Paolo Bonzini
2022-06-07 9:40 ` [PATCH 1/7] meson: put cross compiler info in a separate section Paolo Bonzini
2022-06-07 9:40 ` [PATCH 2/7] build: include pc-bios/ part in the ROMS variable Paolo Bonzini
2022-06-07 9:40 ` Paolo Bonzini [this message]
2022-06-07 9:40 ` [PATCH 4/7] configure: move tests/tcg/Makefile.prereqs to root build directory Paolo Bonzini
2022-06-07 9:40 ` [PATCH 5/7] configure: store container engine in config-host.mak Paolo Bonzini
2022-06-07 9:40 ` [PATCH 6/7] tests: simplify Makefile invocation for tests/tcg Paolo Bonzini
2022-06-07 9:40 ` [PATCH 7/7] tests/tcg: remove -f from Makefile invocation Paolo Bonzini
2022-06-07 10:00 ` [PATCH 0/7] More tests/tcg cleanups Paolo Bonzini
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=20220607094031.1227714-4-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).