etmem/0005-etmem-1.1-add-riscv64-support.patch
zhangxiang 4a8066621c add riscv64 support
add riscv64 support

add riscv64 support

add riscv64 support

add riscv64 support

add riscv64 support
2023-08-09 10:20:37 +08:00

57 lines
2.2 KiB
Diff

From 11665b5fa21babc17a24ebf13c4282bf4b7d6e07 Mon Sep 17 00:00:00 2001
From: zhangxiang <zhangxiang@iscas.ac.cn>
Date: Mon, 31 Jul 2023 17:06:54 +0800
Subject: [PATCH] Add riscv64 support
---
etmem/CMakeLists.txt | 6 ++++++
etmem/test/CMakeLists.txt | 2 ++
2 files changed, 8 insertions(+)
diff --git a/etmem/CMakeLists.txt b/etmem/CMakeLists.txt
index 9e3194a..0b38f07 100644
--- a/etmem/CMakeLists.txt
+++ b/etmem/CMakeLists.txt
@@ -92,6 +92,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" )
target_compile_options(etmemd PRIVATE -march=armv8-a)
elseif( ${ARCHITECTURE} STREQUAL "loongarch64" )
target_compile_options(etmemd PRIVATE -march=loongarch64)
+elseif( ${ARCHITECTURE} STREQUAL "riscv64" )
+ target_compile_options(etmemd PRIVATE -march=rv64gc)
else()
target_compile_options(etmemd PRIVATE -march=core-avx-i -m64)
endif()
@@ -109,6 +111,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" )
target_compile_options(etmem PRIVATE -march=armv8-a)
elseif( ${ARCHITECTURE} STREQUAL "loongarch64" )
target_compile_options(etmemd PRIVATE -march=loongarch64)
+elseif( ${ARCHITECTURE} STREQUAL "riscv64" )
+ target_compile_options(etmemd PRIVATE -march=rv64gc)
else()
target_compile_options(etmem PRIVATE -march=core-avx-i -m64)
endif()
@@ -127,6 +131,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" )
target_compile_options(etmemd_scan PRIVATE -march=armv8-a)
elseif( ${ARCHITECTURE} STREQUAL "loongarch64" )
target_compile_options(etmemd_scan PRIVATE -march=loongarch64)
+elseif( ${ARCHITECTURE} STREQUAL "riscv64" )
+ target_compile_options(etmemd PRIVATE -march=rv64gc)
else()
target_compile_options(etmemd_scan PRIVATE -march=core-avx-i -m64)
endif()
diff --git a/etmem/test/CMakeLists.txt b/etmem/test/CMakeLists.txt
index 928e358..b808eb2 100644
--- a/etmem/test/CMakeLists.txt
+++ b/etmem/test/CMakeLists.txt
@@ -156,6 +156,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64")
SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=armv8-a)
elseif( ${ARCHITECTURE} STREQUAL "loongarch64" )
SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=loongarch64)
+elseif( ${ARCHITECTURE} STREQUAL "riscv64" )
+ SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=rv64gc)
else()
SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=core-avx-i -m64)
endif()
--
Gitee