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