summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Saxena <sachin.saxena@nxp.com>2018-05-04 15:08:29 +0530
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-04 13:41:38 +0000
commit432bf677c6decadd05e3edfe54c02b1d01b2c64e (patch)
tree27daab6984c455e786bab1222c8354d1baccf766
parent6b8fcffd3533421b0882f1e6c75846ab4c5b2f43 (diff)
arm64: Avoid setting march to corei7 when Cross Compiling for ARM
When Cross-compiling VPP for arm64 target and build machine is x86_64, based on build_cpu value, the march variable is set to corei7 which is an unrecoganized option for ARM tool chain. This breaks the VPP compilation. Change-Id: I4cba5b4990e7cf0bdc1403e90c3d18110900bbef Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
-rw-r--r--src/configure.ac6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/configure.ac b/src/configure.ac
index 2a54cd29d42..ca967bb0a9d 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -172,7 +172,7 @@ AS_IF([test "$cc_flag_check" = yes],
[march_skylake_avx512=no])
AM_CONDITIONAL([CC_SUPPORTS_AVX512], [test "$march_skylake_avx512" = "yes"])
-AS_CASE([$build_cpu],
+AS_CASE([$host_cpu],
[x86_64], [CPU_FLAGS="-march=corei7 -mtune=corei7-avx"],
[aarch64], [CPU_FLAGS="-march=armv8-a+crc"],
[CPU_FLAGS=""],
@@ -182,8 +182,8 @@ AC_SUBST([CPU_FLAGS])
AC_SUBST([CPU_AVX2_FLAGS],"-march=core-avx2 -mtune=core-avx2")
AC_SUBST([CPU_AVX512_FLAGS],"-march=skylake-avx512 -mtune=skylake-avx512")
-AM_CONDITIONAL([CPU_X86_64], [test "$build_cpu" = "x86_64"])
-AM_CONDITIONAL([CPU_AARCH64], [test "$build_cpu" = "aarch64"])
+AM_CONDITIONAL([CPU_X86_64], [test "$host_cpu" = "x86_64"])
+AM_CONDITIONAL([CPU_AARCH64], [test "$host_cpu" = "aarch64"])
###############################################################################
# misc compiler flags