diff mbox series

[v2,06/43] configure: set cross_cc_FOO for host compiler

Message ID 20180419135901.30035-7-alex.bennee@linaro.org
State Superseded
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée April 19, 2018, 1:58 p.m. UTC
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>

---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
2.17.0

Comments

Richard Henderson April 19, 2018, 9:04 p.m. UTC | #1
On 04/19/2018 03:58 AM, Alex Bennée wrote:
>      i386)

>             CPU_CFLAGS="-m32"

>             LDFLAGS="-m32 $LDFLAGS"

> +           cross_cc_i386=$cc

> +           cross_cc_cflags_i386=$CPU_CFLAGS

>             ;;

>      x86_64)

>             # ??? Only extremely old AMD cpus do not have cmpxchg16b.

> @@ -1454,7 +1468,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

>             ;;


Partially redundant with patch 4?  Anyway, this is what I was expecting to see
there.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
diff mbox series

Patch

diff --git a/configure b/configure
index 29af33716d..44d310a692 100755
--- a/configure
+++ b/configure
@@ -1416,30 +1416,44 @@  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"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1454,7 +1468,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