aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-04-13 16:15:07 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-06-20 20:22:34 +0100
commit13a5abe2b880bf1fa557c47ff7a4e0c44156ece3 (patch)
treea2f81ec592303464894a6535afb7a5676862bad4 /configure
parentd422b2bc23bfdc04b16dfc8dc761a6d1fe79b08a (diff)
configure: set cross_cc_FOO for host compiler
We can build tests for the host system with the compiler that we have selected. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index 259938e177..4d12cfbe3f 100755
--- a/configure
+++ b/configure
@@ -1431,26 +1431,38 @@ case "$cpu" in
ppc)
CPU_CFLAGS="-m32"
LDFLAGS="-m32 $LDFLAGS"
+ cross_cc_powerpc=$cc
+ cross_cc_cflags_powerpc=$CPU_CFLAGS
;;
ppc64)
CPU_CFLAGS="-m64"
LDFLAGS="-m64 $LDFLAGS"
+ cross_cc_ppc64=$cc
+ cross_cc_cflags_ppc64=$CPU_CFLAGS
;;
sparc)
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
LDFLAGS="-m32 -mv8plus $LDFLAGS"
+ cross_cc_sparc=$cc
+ cross_cc_cflags_sparc=$CPU_CFLAGS
;;
sparc64)
CPU_CFLAGS="-m64 -mcpu=ultrasparc"
LDFLAGS="-m64 $LDFLAGS"
+ cross_cc_sparc64=$cc
+ cross_cc_cflags_sparc64=$CPU_CFLAGS
;;
s390)
CPU_CFLAGS="-m31"
LDFLAGS="-m31 $LDFLAGS"
+ cross_cc_s390=$cc
+ cross_cc_cflags_s390=$CPU_CFLAGS
;;
s390x)
CPU_CFLAGS="-m64"
LDFLAGS="-m64 $LDFLAGS"
+ cross_cc_s390x=$cc
+ cross_cc_cflags_s390x=$CPU_CFLAGS
;;
i386)
CPU_CFLAGS="-m32"
@@ -1471,7 +1483,7 @@ case "$cpu" in
CPU_CFLAGS="-mx32"
LDFLAGS="-mx32 $LDFLAGS"
cross_cc_i386=$cc
- cross_cc_cflags_i386="-m32"
+ cross_cc_cflags_i386=$CPU_CFLAGS
;;
# No special flags required for other host CPUs
esac