From 62988dc63242b65970705c895e69aed50a6c3b47 Mon Sep 17 00:00:00 2001 From: Jianlin Lv Date: Thu, 27 Jun 2019 13:50:30 +0800 Subject: 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 (cherry picked from commit 416e32cf9292b899cbed28ec29836517eb942206) --- src/cmake/cpu.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit 1.2.3-korg