From cbad809d90a96439e196e8610d5b1868bcca5d3d Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 16 May 2023 17:06:02 +0800 Subject: [PATCH] add sw support Signed-off-by: wxiat --- 1001-anolis-redis-add-sw.patch | 41 ++++++++++++++++++++++++++++++++++ redis.spec | 8 ++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 1001-anolis-redis-add-sw.patch diff --git a/1001-anolis-redis-add-sw.patch b/1001-anolis-redis-add-sw.patch new file mode 100644 index 0000000..f0774df --- /dev/null +++ b/1001-anolis-redis-add-sw.patch @@ -0,0 +1,41 @@ +From ad5bc2d0dcf5d42491eb1e944ad4c92bd5285f78 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Tue, 16 May 2023 17:00:11 +0800 +Subject: [PATCH] add sw + +Signed-off-by: wxiat +--- + .../include/jemalloc/internal/jemalloc_internal_types.h | 3 +++ + src/config.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 780627d..203b272 100644 +--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h ++++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +@@ -64,6 +64,9 @@ typedef int malloc_cpuid_t; + # ifdef __alpha__ + # define LG_QUANTUM 4 + # endif ++# ifdef __sw_64__ ++# define LG_QUANTUM 4 ++# endif + # if (defined(__sparc64__) || defined(__sparcv9) || defined(__sparc_v9__)) + # define LG_QUANTUM 4 + # endif +diff --git a/src/config.h b/src/config.h +index efa9d11..90bb412 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -147,7 +147,7 @@ void setproctitle(const char *fmt, ...); + #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ + defined(vax) || defined(ns32000) || defined(sun386) || \ + defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ +- defined(__alpha__) || defined(__alpha) ++ defined(__alpha__) || defined(__alpha) || defined(__sw_64__) || defined(__sw_64) + #define BYTE_ORDER LITTLE_ENDIAN + #endif + +-- +2.31.1 + diff --git a/redis.spec b/redis.spec index 28cbc10..c8e6757 100644 --- a/redis.spec +++ b/redis.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 # # RHEL / Fedora spec file for redis # @@ -61,6 +61,8 @@ Patch104: redis-CVE-2021-41099.patch Patch105: redis-CVE-2021-32675.patch Patch1000: 1000-anolis-redis-add-loongarch-support.patch +# add sw support +Patch1001: 1001-anolis-redis-add-sw.patch BuildRequires: gcc %if %{with tests} @@ -153,6 +155,7 @@ mv ../%{name}-doc-%{doc_commit} doc %patch105 -p1 -b .cve-2011-32675 %patch1000 -p1 +%patch1001 -p1 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -301,6 +304,9 @@ exit 0 %changelog +* Tue May 16 2023 wxiat - 6.0.9-5.0.2 +- add sw patch + * Tue Jan 25 2022 Liwei Ge - 6.0.9-5.0.1 - Support loongarch64 platform -- Gitee