From 6c1b666484ca99afdd1cda5a0c7b235028e499fa Mon Sep 17 00:00:00 2001 From: Eric Long Date: Sun, 12 Mar 2023 21:42:56 +0800 Subject: [PATCH] add `-march=rv64gc` for riscv64 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9660f557..8c76dc80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,8 @@ ELSE() ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "(arm)|(ARM)|(armhf)|(ARMHF)|(armel)|(ARMEL)") add_definitions (-march=armv7-a) + ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "(riscv64)") + add_definitions (-march=rv64gc) ELSE () add_definitions (-march=native) #TODO use correct c++11 def once everybody has moved to gcc 4.7 # for now I even removed std=gnu++0x ENDIF()