!73 Add riscv64 support
From: @a-xiang-and-shanhaijing Reviewed-by: @liubo254, @liuzhiqiang26 Signed-off-by: @liuzhiqiang26
This commit is contained in:
commit
ad80f22697
56
0005-etmem-1.1-add-riscv64-support.patch
Normal file
56
0005-etmem-1.1-add-riscv64-support.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: etmem
|
Name: etmem
|
||||||
Version: 1.1
|
Version: 1.1
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: etmem
|
Summary: etmem
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/etmem
|
URL: https://gitee.com/openeuler/etmem
|
||||||
@ -12,6 +12,7 @@ Patch0000: 0001-etmem-1.1-add-loongarch64-support.patch
|
|||||||
Patch0001: 0002-etmem-remove-unnecessary-log-code.patch
|
Patch0001: 0002-etmem-remove-unnecessary-log-code.patch
|
||||||
Patch0002: 0003-etmem-fix-memory-leak-and-fd-leak.patch
|
Patch0002: 0003-etmem-fix-memory-leak-and-fd-leak.patch
|
||||||
Patch0003: 0004-etmem-fix-multiple-etmemd-and-too-many-err-log-probl.patch
|
Patch0003: 0004-etmem-fix-multiple-etmemd-and-too-many-err-log-probl.patch
|
||||||
|
Patch0004: 0005-etmem-1.1-add-riscv64-support.patch
|
||||||
|
|
||||||
#Dependency
|
#Dependency
|
||||||
BuildRequires: cmake gcc gcc-c++ glib2-devel
|
BuildRequires: cmake gcc gcc-c++ glib2-devel
|
||||||
@ -65,6 +66,9 @@ install -m 0644 userswap/include/uswap_api.h $RPM_BUILD_ROOT%{_includedir}
|
|||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 20 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 1.1-5
|
||||||
|
- Add riscv64 support
|
||||||
|
|
||||||
* Thu Jun 8 2023 liubo <liubo254@huawei.com> 1.1-4
|
* Thu Jun 8 2023 liubo <liubo254@huawei.com> 1.1-4
|
||||||
- backport bugfix patch from upstream
|
- backport bugfix patch from upstream
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user