From 8459cc48cfdda8a86576f10fef6f9d2f030b3ae4 Mon Sep 17 00:00:00 2001 From: WangQiang Date: Tue, 28 Jun 2022 10:26:49 +0800 Subject: [PATCH] Add loongarch64 support --- Add-loongarch64-support.patch | 26 ++++++++++++++++++++++++++ redis6.spec | 8 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 Add-loongarch64-support.patch diff --git a/Add-loongarch64-support.patch b/Add-loongarch64-support.patch new file mode 100644 index 0000000..86df73a --- /dev/null +++ b/Add-loongarch64-support.patch @@ -0,0 +1,26 @@ +From a1f23456adfaec27df27bba511bcf7fae59708f0 Mon Sep 17 00:00:00 2001 +From: WangQiang +Date: Tue, 28 Jun 2022 10:10:21 +0800 +Subject: [PATCH] Add LoongArch64 Support + +--- + .../include/jemalloc/internal/jemalloc_internal_types.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 1b750b1..780627d 100644 +--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h ++++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +@@ -107,6 +107,9 @@ typedef int malloc_cpuid_t; + # ifdef __tile__ + # define LG_QUANTUM 4 + # endif ++# ifdef __loongarch__ ++# define LG_QUANTUM 4 ++# endif + # ifdef __le32__ + # define LG_QUANTUM 4 + # endif +-- +2.27.0 + diff --git a/redis6.spec b/redis6.spec index fd86354..34aad7b 100644 --- a/redis6.spec +++ b/redis6.spec @@ -22,6 +22,8 @@ Source10: https://github.com/%{Pname}/%{Pname}-doc/archive/%{doc_comm Patch0001: Modify-aarch64-architecture-jemalloc-page-size-from-from-4k-to-64k.patch Patch0002: CVE-2021-32626.patch + +Patch0003: Add-loongarch64-support.patch BuildRequires: make gcc %if %{with tests} BuildRequires: procps-ng tcl @@ -82,6 +84,9 @@ tar -xvf %{SOURCE10} %patch0001 -p1 %patch0002 -p1 %endif +%ifarch loongarch64 +%patch0003 -p1 +%endif mv ../%{Pname}-doc-%{doc_commit} doc mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -210,6 +215,9 @@ fi %{_docdir}/%{Pname} %changelog +* Tue Jun 28 2022 wangqiang - 6.0.11-4 +- Add loongarch64 support + * Thu Nov 04 2021 liwu - 6.0.11-4 - Fix CVE-2021-32626 -- Gitee