From 4ea1e7293c73143cc60a0d90bc16dfea4ebb7770 Mon Sep 17 00:00:00 2001 From: sunshihao Date: Sat, 20 Mar 2021 18:14:42 +0800 Subject: [PATCH] change aarch64 march to armv8-a The atomic operation is used in the etmem code, If the compiler instruction set is higher than the executor instruction set, the etmemd process will crash. Signed-off-by: liubo --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3064f7..a4a83ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ set_target_properties(etmemd PROPERTIES LINK_FLAGS "-s -fPIE -pie -fPIC -Wl,-z,r target_link_libraries(etmemd PRIVATE pthread dl rt boundscheck) if( ${ARCHITECTURE} STREQUAL "aarch64" ) - target_compile_options(etmemd PRIVATE -march=native) + target_compile_options(etmemd PRIVATE -march=armv8-a) else() target_compile_options(etmemd PRIVATE -march=core-avx-i -m64) endif() @@ -86,7 +86,7 @@ set_target_properties(etmem PROPERTIES LINK_FLAGS "-s -fPIE -pie -fPIC -Wl,-z,re target_link_libraries(etmem PRIVATE pthread dl rt boundscheck) if( ${ARCHITECTURE} STREQUAL "aarch64" ) - target_compile_options(etmem PRIVATE -march=native) + target_compile_options(etmem PRIVATE -march=armv8-a) else() target_compile_options(etmem PRIVATE -march=core-avx-i -m64) endif() -- 1.8.3.1