summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJianlin Lv <Jianlin.Lv@arm.com>2019-06-27 13:50:30 +0800
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-09-21 08:28:17 +0000
commit62988dc63242b65970705c895e69aed50a6c3b47 (patch)
treec0dd259bbd9086d33fbb03051c600649a5ac2b33
parent61d9c6bfdf8e418a98f0b162d41db97e82cc5a23 (diff)
build: fix vpp compilation failure on ThunderX2 and Amp
fix compile issue that caused by enabling "-mtune=thunderx2t99" flag during compilation, such as "/opt/vpp-agent/dev/vpp/src/vnet/interface_stats.c:164:1: internal compiler error: Segmentation fault" Type: fix Change-Id: Iaf9f80a6c203a7e5b6a40523f14a62bb37091c92 Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com> (cherry picked from commit 416e32cf9292b899cbed28ec29836517eb942206)
-rw-r--r--src/cmake/cpu.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake
index e586ecc523c..1dd483457e9 100644
--- a/src/cmake/cpu.cmake
+++ b/src/cmake/cpu.cmake
@@ -76,7 +76,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
endif()
check_c_compiler_flag("-march=armv8.1-a+crc+crypto -mtune=thunderx2t99" compiler_flag_march_thunderx2t99)
if(compiler_flag_march_thunderx2t99)
- if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 7.3)
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.3)
list(APPEND MARCH_VARIANTS "thunderx2t99\;-march=armv8.1-a+crc+crypto -mtune=thunderx2t99 -DCLIB_N_PREFETCHES=8")
else()
list(APPEND MARCH_VARIANTS "thunderx2t99\;-march=armv8.1-a+crc+crypto -DCLIB_N_PREFETCHES=8")