diff mbox series

[v2,30/30] configure: use cc, not host_cc to set cross_cc for build arch

Message ID 20210504100223.25427-31-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show
Series testing/next (hexagon, tricore, ppc, signals, cirrus) | expand

Commit Message

Alex Bennée May 4, 2021, 10:02 a.m. UTC
Otherwise you run into hilarity like trying when cross compiling a 32
bit ARM build on a 64 bit system trying to use host_cc to build 32 bit
test cases.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé May 12, 2021, 4:50 a.m. UTC | #1
On 5/4/21 12:02 PM, Alex Bennée wrote:
> Otherwise you run into hilarity like trying when cross compiling a 32
> bit ARM build on a 64 bit system trying to use host_cc to build 32 bit
> test cases.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/configure b/configure
index bb86c72479..aef53cd8bb 100755
--- a/configure
+++ b/configure
@@ -1648,7 +1648,7 @@  case "$cpu" in
     # No special flags required for other host CPUs
 esac
 
-eval "cross_cc_${cpu}=\$host_cc"
+eval "cross_cc_${cpu}=\$cc"
 cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
 QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"