!32 同步master分支到openEuler-2403-LTS-SP1
From: @hengliue Reviewed-by: @zhang_xubo Signed-off-by: @zhang_xubo
This commit is contained in:
commit
59b0f918d3
@ -1,80 +0,0 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/CMakeLists.txt DCF-5.0.1-edit/CMakeLists.txt
|
||||
*** DCF-5.0.1/CMakeLists.txt 2024-05-07 17:22:01.091857616 +0800
|
||||
--- DCF-5.0.1-edit/CMakeLists.txt 2024-05-07 17:20:19.623110156 +0800
|
||||
***************
|
||||
*** 10,16 ****
|
||||
set(CJSON_PATH "${DCF_LIBRARY}/cJSON/lib")
|
||||
set(VERSION_SRC ${PROJECT_SOURCE_DIR}/src/dcf_version.c)
|
||||
|
||||
! set(vpp_libsecurec "securec")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX $ENV{dcf_install_prefix})
|
||||
|
||||
--- 10,16 ----
|
||||
set(CJSON_PATH "${DCF_LIBRARY}/cJSON/lib")
|
||||
set(VERSION_SRC ${PROJECT_SOURCE_DIR}/src/dcf_version.c)
|
||||
|
||||
! set(vpp_libsecurec "boundscheck")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX $ENV{dcf_install_prefix})
|
||||
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/dcf_interface.c DCF-5.0.1-edit/src/dcf_interface.c
|
||||
*** DCF-5.0.1/src/dcf_interface.c 2024-05-07 17:22:01.099857675 +0800
|
||||
--- DCF-5.0.1-edit/src/dcf_interface.c 2024-05-07 17:20:19.631110215 +0800
|
||||
***************
|
||||
*** 39,45 ****
|
||||
#include "elc_status_check.h"
|
||||
#include "util_perf_stat.h"
|
||||
#include "cm_ip.h"
|
||||
! #include "cJSON.h"
|
||||
#include "util_profile_stat.h"
|
||||
#include "stream.h"
|
||||
#include "cb_func.h"
|
||||
--- 39,45 ----
|
||||
#include "elc_status_check.h"
|
||||
#include "util_perf_stat.h"
|
||||
#include "cm_ip.h"
|
||||
! #include "cjson/cJSON.h"
|
||||
#include "util_profile_stat.h"
|
||||
#include "stream.h"
|
||||
#include "cb_func.h"
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/metadata/metadata.c DCF-5.0.1-edit/src/metadata/metadata.c
|
||||
*** DCF-5.0.1/src/metadata/metadata.c 2024-05-07 17:22:01.103857704 +0800
|
||||
--- DCF-5.0.1-edit/src/metadata/metadata.c 2024-05-07 17:20:19.635110245 +0800
|
||||
***************
|
||||
*** 32,38 ****
|
||||
#include "md_stream.h"
|
||||
#include "md_param.h"
|
||||
#include "md_store.h"
|
||||
! #include "cJSON.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
--- 32,38 ----
|
||||
#include "md_stream.h"
|
||||
#include "md_param.h"
|
||||
#include "md_store.h"
|
||||
! #include "cjson/cJSON.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/utils/util_profile_stat.h DCF-5.0.1-edit/src/utils/util_profile_stat.h
|
||||
*** DCF-5.0.1/src/utils/util_profile_stat.h 2024-05-07 17:22:01.107857734 +0800
|
||||
--- DCF-5.0.1-edit/src/utils/util_profile_stat.h 2024-05-07 17:20:19.639110274 +0800
|
||||
***************
|
||||
*** 37,43 ****
|
||||
#include "cm_num.h"
|
||||
#include "cm_latch.h"
|
||||
#include "cm_file.h"
|
||||
! #include "cJSON.h"
|
||||
|
||||
#define DEFAULT_STAT_INTERVAL 3
|
||||
#define MAX_ITEM_COUNT 100
|
||||
--- 37,43 ----
|
||||
#include "cm_num.h"
|
||||
#include "cm_latch.h"
|
||||
#include "cm_file.h"
|
||||
! #include "cjson/cJSON.h"
|
||||
|
||||
#define DEFAULT_STAT_INTERVAL 3
|
||||
#define MAX_ITEM_COUNT 100
|
||||
@ -1,95 +0,0 @@
|
||||
From d9f173dc91f4544664443a8302e3eb42fb88fba8 Mon Sep 17 00:00:00 2001
|
||||
From: Jingyun Hua <huajingyun@loongson.cn>
|
||||
Date: Mon, 29 May 2023 02:16:31 +0000
|
||||
Subject: [PATCH] DCF-1.0.0:add loongarch64 support
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
src/common/cm_concurrency/cm_spinlock.h | 5 +++++
|
||||
src/common/cm_concurrency/cm_thread.c | 2 ++
|
||||
src/common/cm_utils/cm_checksum.h | 2 +-
|
||||
src/common/cm_utils/cm_memory.h | 6 ++++++
|
||||
5 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 81d310b..c8ba6b5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -89,7 +89,7 @@ if (UNIX)
|
||||
|
||||
add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables)
|
||||
else ()
|
||||
- add_compile_options(-msse4.2 )
|
||||
+ add_compile_options()
|
||||
endif ()
|
||||
Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110)
|
||||
else ()
|
||||
@@ -106,4 +106,4 @@ add_subdirectory(src)
|
||||
OPTION(TEST "option for test module" ON)
|
||||
if (TEST)
|
||||
add_subdirectory(test)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
diff --git a/src/common/cm_concurrency/cm_spinlock.h b/src/common/cm_concurrency/cm_spinlock.h
|
||||
index 7965853..3b6d961 100644
|
||||
--- a/src/common/cm_concurrency/cm_spinlock.h
|
||||
+++ b/src/common/cm_concurrency/cm_spinlock.h
|
||||
@@ -68,6 +68,11 @@ typedef struct st_spin_statis {
|
||||
{ \
|
||||
__asm__ volatile("nop"); \
|
||||
}
|
||||
+#elif defined(__loongarch64)
|
||||
+#define fas_cpu_pause() \
|
||||
+ { \
|
||||
+ __asm__ volatile("dbar 0"); \
|
||||
+ }
|
||||
#else
|
||||
#define fas_cpu_pause() \
|
||||
{ \
|
||||
diff --git a/src/common/cm_concurrency/cm_thread.c b/src/common/cm_concurrency/cm_thread.c
|
||||
index 2d0aa2a..0bbf502 100644
|
||||
--- a/src/common/cm_concurrency/cm_thread.c
|
||||
+++ b/src/common/cm_concurrency/cm_thread.c
|
||||
@@ -296,6 +296,8 @@ uint32 cm_get_current_thread_id()
|
||||
#define __SYS_GET_SPID 186
|
||||
#elif (defined __aarch64__)
|
||||
#define __SYS_GET_SPID 178
|
||||
+#elif (defined __loongarch64)
|
||||
+#define __SYS_GET_SPID 178
|
||||
#endif
|
||||
#define gettid() syscall(__SYS_GET_SPID)
|
||||
|
||||
diff --git a/src/common/cm_utils/cm_checksum.h b/src/common/cm_utils/cm_checksum.h
|
||||
index 85bb9fa..3d8bd8f 100644
|
||||
--- a/src/common/cm_utils/cm_checksum.h
|
||||
+++ b/src/common/cm_utils/cm_checksum.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "cm_defs.h"
|
||||
|
||||
-#if defined(__arm__) || defined(__aarch64__)
|
||||
+#if defined(__arm__) || defined(__aarch64__) || defined(__loongarch64)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<arm_acle.h>)
|
||||
#include <arm_acle.h>
|
||||
diff --git a/src/common/cm_utils/cm_memory.h b/src/common/cm_utils/cm_memory.h
|
||||
index 988b78e..4a1debf 100644
|
||||
--- a/src/common/cm_utils/cm_memory.h
|
||||
+++ b/src/common/cm_utils/cm_memory.h
|
||||
@@ -56,6 +56,12 @@ extern "C" {
|
||||
__asm__ volatile("dmb ish" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
+#elif defined(__loongarch64)
|
||||
+#define CM_MFENCE \
|
||||
+ { \
|
||||
+ __asm__ volatile("dbar 0" :: \
|
||||
+ : "memory"); \
|
||||
+ }
|
||||
#else
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
From 645a5d63a1cbf866babdce9eade8d5719f62a7fc Mon Sep 17 00:00:00 2001
|
||||
From: misaka00251 <liuxin@iscas.ac.cn>
|
||||
Date: Fri, 28 Jul 2023 15:19:20 +0800
|
||||
Subject: [PATCH] Add riscv64 support
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/common/cm_concurrency/cm_spinlock.h | 2 +-
|
||||
src/common/cm_concurrency/cm_thread.c | 2 +-
|
||||
src/common/cm_utils/cm_checksum.h | 2 +-
|
||||
src/common/cm_utils/cm_memory.h | 6 ++++++
|
||||
5 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0380198..89d8551 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -89,7 +89,7 @@ if (UNIX)
|
||||
|
||||
add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables)
|
||||
else ()
|
||||
- add_compile_options(-msse4.2 )
|
||||
+ add_compile_options()
|
||||
endif ()
|
||||
Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110)
|
||||
else ()
|
||||
diff --git a/src/common/cm_concurrency/cm_spinlock.h b/src/common/cm_concurrency/cm_spinlock.h
|
||||
index 7965853..c7ef986 100644
|
||||
--- a/src/common/cm_concurrency/cm_spinlock.h
|
||||
+++ b/src/common/cm_concurrency/cm_spinlock.h
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
|
||||
typedef volatile uint32 spinlock_t;
|
||||
typedef volatile uint32 ip_spinlock_t;
|
||||
-#if defined(__arm__) || defined(__aarch64__)
|
||||
+#if defined(__arm__) || defined(__aarch64__) || defined(_riscv)
|
||||
#define GS_INIT_SPIN_LOCK(lock) \
|
||||
{ \
|
||||
__atomic_store_n(&lock, 0, __ATOMIC_SEQ_CST); \
|
||||
diff --git a/src/common/cm_concurrency/cm_thread.c b/src/common/cm_concurrency/cm_thread.c
|
||||
index 2d0aa2a..fd5f0f1 100644
|
||||
--- a/src/common/cm_concurrency/cm_thread.c
|
||||
+++ b/src/common/cm_concurrency/cm_thread.c
|
||||
@@ -294,7 +294,7 @@ uint32 cm_get_current_thread_id()
|
||||
{
|
||||
#if (defined __x86_64__)
|
||||
#define __SYS_GET_SPID 186
|
||||
-#elif (defined __aarch64__)
|
||||
+#elif (defined __aarch64__) || defined(__riscv)
|
||||
#define __SYS_GET_SPID 178
|
||||
#endif
|
||||
#define gettid() syscall(__SYS_GET_SPID)
|
||||
diff --git a/src/common/cm_utils/cm_checksum.h b/src/common/cm_utils/cm_checksum.h
|
||||
index 85bb9fa..06e60ca 100644
|
||||
--- a/src/common/cm_utils/cm_checksum.h
|
||||
+++ b/src/common/cm_utils/cm_checksum.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "cm_defs.h"
|
||||
|
||||
-#if defined(__arm__) || defined(__aarch64__)
|
||||
+#if defined(__arm__) || defined(__aarch64__) || defined(__riscv)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<arm_acle.h>)
|
||||
#include <arm_acle.h>
|
||||
diff --git a/src/common/cm_utils/cm_memory.h b/src/common/cm_utils/cm_memory.h
|
||||
index 988b78e..05520a6 100644
|
||||
--- a/src/common/cm_utils/cm_memory.h
|
||||
+++ b/src/common/cm_utils/cm_memory.h
|
||||
@@ -56,6 +56,12 @@ extern "C" {
|
||||
__asm__ volatile("dmb ish" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
+#elif defined(__riscv)
|
||||
+#define CM_MFENCE \
|
||||
+ { \
|
||||
+ __asm__ volatile("fence " iorw "," iorw :: \
|
||||
+ : "memory"); \
|
||||
+ }
|
||||
#else
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
--
|
||||
2.39.2 (Apple Git-143)
|
||||
|
||||
@ -1,76 +0,0 @@
|
||||
diff -Nuar DCF-1.0.0.org/CMakeLists.txt DCF-1.0.0.sw/CMakeLists.txt
|
||||
--- DCF-1.0.0.org/CMakeLists.txt 2022-06-13 11:22:02.120000000 +0000
|
||||
+++ DCF-1.0.0.sw/CMakeLists.txt 2022-06-13 11:22:51.510000000 +0000
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables)
|
||||
else ()
|
||||
- add_compile_options(-msse4.2 )
|
||||
+ add_compile_options( )
|
||||
endif ()
|
||||
Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110)
|
||||
else ()
|
||||
@@ -106,4 +106,4 @@
|
||||
OPTION(TEST "option for test module" ON)
|
||||
if (TEST)
|
||||
add_subdirectory(test)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
diff -Nuar DCF-1.0.0.org/src/common/cm_concurrency/cm_spinlock.h DCF-1.0.0.sw/src/common/cm_concurrency/cm_spinlock.h
|
||||
--- DCF-1.0.0.org/src/common/cm_concurrency/cm_spinlock.h 2022-06-13 11:22:02.090000000 +0000
|
||||
+++ DCF-1.0.0.sw/src/common/cm_concurrency/cm_spinlock.h 2022-06-13 16:12:03.530000000 +0000
|
||||
@@ -68,6 +68,9 @@
|
||||
{ \
|
||||
__asm__ volatile("nop"); \
|
||||
}
|
||||
+#elif defined(__sw_64__)
|
||||
+#define fas_cpu_pause() \
|
||||
+ {}
|
||||
#else
|
||||
#define fas_cpu_pause() \
|
||||
{ \
|
||||
diff -Nuar DCF-1.0.0.org/src/common/cm_concurrency/cm_thread.c DCF-1.0.0.sw/src/common/cm_concurrency/cm_thread.c
|
||||
--- DCF-1.0.0.org/src/common/cm_concurrency/cm_thread.c 2022-06-13 11:22:02.100000000 +0000
|
||||
+++ DCF-1.0.0.sw/src/common/cm_concurrency/cm_thread.c 2022-06-13 16:39:23.220000000 +0000
|
||||
@@ -296,6 +296,8 @@
|
||||
#define __SYS_GET_SPID 186
|
||||
#elif (defined __aarch64__)
|
||||
#define __SYS_GET_SPID 178
|
||||
+#elif (defined __sw_64__)
|
||||
+#define __SYS_GET_SPID 378
|
||||
#endif
|
||||
#define gettid() syscall(__SYS_GET_SPID)
|
||||
|
||||
diff -Nuar DCF-1.0.0.org/src/common/cm_utils/cm_checksum.h DCF-1.0.0.sw/src/common/cm_utils/cm_checksum.h
|
||||
--- DCF-1.0.0.org/src/common/cm_utils/cm_checksum.h 2022-06-13 11:22:02.100000000 +0000
|
||||
+++ DCF-1.0.0.sw/src/common/cm_utils/cm_checksum.h 2022-06-13 16:33:54.130000000 +0000
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "cm_defs.h"
|
||||
|
||||
-#if defined(__arm__) || defined(__aarch64__)
|
||||
+#if defined(__arm__) || defined(__aarch64__) || defined(__sw_64__)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<arm_acle.h>)
|
||||
#include <arm_acle.h>
|
||||
diff -Nuar DCF-1.0.0.org/src/common/cm_utils/cm_memory.h DCF-1.0.0.sw/src/common/cm_utils/cm_memory.h
|
||||
--- DCF-1.0.0.org/src/common/cm_utils/cm_memory.h 2022-06-13 11:22:02.100000000 +0000
|
||||
+++ DCF-1.0.0.sw/src/common/cm_utils/cm_memory.h 2022-06-13 16:10:02.430000000 +0000
|
||||
@@ -50,12 +50,15 @@
|
||||
__asm {mfence } \
|
||||
}
|
||||
#endif
|
||||
-#elif defined(__arm__) || defined(__aarch64__)
|
||||
+#elif defined(__arm__) || defined(__aarch64__)
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
__asm__ volatile("dmb ish" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
+#elif defined(__sw_64__)
|
||||
+#define CM_MFENCE \
|
||||
+ {}
|
||||
#else
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
BIN
DCF-5.0.1.tar.gz
BIN
DCF-5.0.1.tar.gz
Binary file not shown.
74
DCF-6.0.0-add-riscv64-support.patch
Normal file
74
DCF-6.0.0-add-riscv64-support.patch
Normal file
@ -0,0 +1,74 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/CMakeLists.txt DCF-6.0.0-edit/CMakeLists.txt
|
||||
*** DCF-6.0.0/CMakeLists.txt 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/CMakeLists.txt 2024-11-02 17:04:05.634252331 +0800
|
||||
***************
|
||||
*** 84,89 ****
|
||||
--- 84,91 ----
|
||||
add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables)
|
||||
elseif (OS_ARCH STREQUAL "x86_64")
|
||||
add_compile_options(-msse4.2 )
|
||||
+ else ()
|
||||
+ add_compile_options()
|
||||
endif ()
|
||||
Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110)
|
||||
else ()
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_concurrency/cm_spinlock.h DCF-6.0.0-edit/src/common/cm_concurrency/cm_spinlock.h
|
||||
*** DCF-6.0.0/src/common/cm_concurrency/cm_spinlock.h 2024-11-02 17:38:45.539451623 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_concurrency/cm_spinlock.h 2024-11-02 17:37:19.778567408 +0800
|
||||
***************
|
||||
*** 63,69 ****
|
||||
uint64 fails;
|
||||
} spin_statis_t;
|
||||
|
||||
! #if defined(__arm__) || defined(__aarch64__) || defined(__loongarch__)
|
||||
#define fas_cpu_pause() \
|
||||
{ \
|
||||
__asm__ volatile("nop"); \
|
||||
--- 63,69 ----
|
||||
uint64 fails;
|
||||
} spin_statis_t;
|
||||
|
||||
! #if defined(__arm__) || defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
|
||||
#define fas_cpu_pause() \
|
||||
{ \
|
||||
__asm__ volatile("nop"); \
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_concurrency/cm_thread.c DCF-6.0.0-edit/src/common/cm_concurrency/cm_thread.c
|
||||
*** DCF-6.0.0/src/common/cm_concurrency/cm_thread.c 2024-11-02 17:38:45.539451623 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_concurrency/cm_thread.c 2024-11-02 17:37:19.779567360 +0800
|
||||
***************
|
||||
*** 296,302 ****
|
||||
#define __SYS_GET_SPID 186
|
||||
#elif (defined __aarch64__)
|
||||
#define __SYS_GET_SPID 178
|
||||
! #elif (defined __loongarch__)
|
||||
#include<sys/syscall.h>
|
||||
#define __SYS_GET_SPID SYS_gettid
|
||||
#endif
|
||||
--- 296,302 ----
|
||||
#define __SYS_GET_SPID 186
|
||||
#elif (defined __aarch64__)
|
||||
#define __SYS_GET_SPID 178
|
||||
! #elif (defined __loongarch__) || (defined __riscv)
|
||||
#include<sys/syscall.h>
|
||||
#define __SYS_GET_SPID SYS_gettid
|
||||
#endif
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_utils/cm_memory.h DCF-6.0.0-edit/src/common/cm_utils/cm_memory.h
|
||||
*** DCF-6.0.0/src/common/cm_utils/cm_memory.h 2024-11-02 17:38:45.539451623 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_utils/cm_memory.h 2024-11-02 17:37:19.781567264 +0800
|
||||
***************
|
||||
*** 62,68 ****
|
||||
__asm__ volatile("mfence" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
! #elif defined(__loongarch__)
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
__asm__ volatile("" :: \
|
||||
--- 62,68 ----
|
||||
__asm__ volatile("mfence" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
! #elif defined(__loongarch__) || defined(__riscv)
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
__asm__ volatile("" :: \
|
||||
78
DCF-6.0.0-sw.patch
Normal file
78
DCF-6.0.0-sw.patch
Normal file
@ -0,0 +1,78 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/CMakeLists.txt DCF-6.0.0-edit/CMakeLists.txt
|
||||
*** DCF-6.0.0/CMakeLists.txt 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/CMakeLists.txt 2024-11-02 17:04:05.634252331 +0800
|
||||
***************
|
||||
*** 84,89 ****
|
||||
--- 84,91 ----
|
||||
add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables)
|
||||
elseif (OS_ARCH STREQUAL "x86_64")
|
||||
add_compile_options(-msse4.2 )
|
||||
+ else ()
|
||||
+ add_compile_options()
|
||||
endif ()
|
||||
Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110)
|
||||
else ()
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_concurrency/cm_spinlock.h DCF-6.0.0-edit/src/common/cm_concurrency/cm_spinlock.h
|
||||
*** DCF-6.0.0/src/common/cm_concurrency/cm_spinlock.h 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_concurrency/cm_spinlock.h 2024-11-02 17:04:32.631956892 +0800
|
||||
***************
|
||||
*** 68,73 ****
|
||||
--- 68,76 ----
|
||||
{ \
|
||||
__asm__ volatile("nop"); \
|
||||
}
|
||||
+ #elif defined(__sw_64__)
|
||||
+ #define fas_cpu_pause() \
|
||||
+ {}
|
||||
#else
|
||||
#define fas_cpu_pause() \
|
||||
{ \
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_concurrency/cm_thread.c DCF-6.0.0-edit/src/common/cm_concurrency/cm_thread.c
|
||||
*** DCF-6.0.0/src/common/cm_concurrency/cm_thread.c 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_concurrency/cm_thread.c 2024-11-02 17:04:32.631956892 +0800
|
||||
***************
|
||||
*** 296,301 ****
|
||||
--- 296,303 ----
|
||||
#define __SYS_GET_SPID 186
|
||||
#elif (defined __aarch64__)
|
||||
#define __SYS_GET_SPID 178
|
||||
+ #elif (defined __sw_64__)
|
||||
+ #define __SYS_GET_SPID 378
|
||||
#elif (defined __loongarch__)
|
||||
#include<sys/syscall.h>
|
||||
#define __SYS_GET_SPID SYS_gettid
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_utils/cm_checksum.h DCF-6.0.0-edit/src/common/cm_utils/cm_checksum.h
|
||||
*** DCF-6.0.0/src/common/cm_utils/cm_checksum.h 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_utils/cm_checksum.h 2024-11-02 17:04:05.637252187 +0800
|
||||
***************
|
||||
*** 26,32 ****
|
||||
|
||||
#include "cm_defs.h"
|
||||
|
||||
! #if defined(__arm__) || defined(__aarch64__)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<arm_acle.h>)
|
||||
#include <arm_acle.h>
|
||||
--- 26,32 ----
|
||||
|
||||
#include "cm_defs.h"
|
||||
|
||||
! #if defined(__arm__) || defined(__aarch64__) || defined(__sw_64__)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<arm_acle.h>)
|
||||
#include <arm_acle.h>
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/common/cm_utils/cm_memory.h DCF-6.0.0-edit/src/common/cm_utils/cm_memory.h
|
||||
*** DCF-6.0.0/src/common/cm_utils/cm_memory.h 2024-11-02 17:04:54.937886579 +0800
|
||||
--- DCF-6.0.0-edit/src/common/cm_utils/cm_memory.h 2024-11-02 17:04:32.631956892 +0800
|
||||
***************
|
||||
*** 56,61 ****
|
||||
--- 56,64 ----
|
||||
__asm__ volatile("dmb ish" :: \
|
||||
: "memory"); \
|
||||
}
|
||||
+ #elif defined(__sw_64__)
|
||||
+ #define CM_MFENCE \
|
||||
+ {}
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
#define CM_MFENCE \
|
||||
{ \
|
||||
BIN
DCF-6.0.0.tar.gz
Normal file
BIN
DCF-6.0.0.tar.gz
Normal file
Binary file not shown.
@ -1,17 +1,15 @@
|
||||
Name: DCF
|
||||
Version: 5.0.1
|
||||
Release: 7
|
||||
Version: 6.0.0
|
||||
Release: 9
|
||||
Summary: A distributed consensus framework library
|
||||
License: MulanPSL-2.0
|
||||
URL: https://gitee.com/opengauss/DCF
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch1: 01-boundcheck.patch
|
||||
Patch2: DCF-1.0.0-sw.patch
|
||||
Patch3: DCF-1.0.0-add-loongarch64-support.patch
|
||||
Patch4: DCF-1.0.0-add-riscv64-support.patch
|
||||
Patch1: DCF-6.0.0-sw.patch
|
||||
Patch2: DCF-6.0.0-add-riscv64-support.patch
|
||||
|
||||
BuildRequires: cmake gcc gcc-c++ lz4-devel openssl-devel zstd-devel libboundscheck cjson-devel
|
||||
BuildRequires: tar cmake gcc gcc-c++ lz4-devel openssl-devel zstd-devel libboundscheck cjson-devel
|
||||
|
||||
|
||||
%description
|
||||
@ -20,15 +18,11 @@ DCF is A distributed consensus framework library for openGauss
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%ifarch sw_64
|
||||
%patch2 -p1
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
%patch3 -p1
|
||||
%patch -P1 -p1
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
%patch4 -p1
|
||||
%patch -P2 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
@ -64,6 +58,12 @@ cp output/lib/libdcf.* %{buildroot}/%{_prefix}/lib64
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Nov 2 2024 liuheng <liuheng76@huawei.com> - 6.0.0-9
|
||||
- Update version to 6.0.0
|
||||
|
||||
* Mon Oct 28 2024 Funda Wang <fundawang@yeah.net> - 5.0.1-8
|
||||
- adopt to cmake macro change
|
||||
|
||||
* Mon May 6 2024 liuheng <liuheng76@huawei.com> - 5.0.1-7
|
||||
- Update version to 5.0.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user