From 1f419986f06cb969a5b6691c886e1335be87a704 Mon Sep 17 00:00:00 2001 From: zhangfeilong Date: Wed, 24 Sep 2025 16:23:37 +0800 Subject: [PATCH] add sw64 support --- Add-sw64-support.patch | 25 +++++++++++++ ...config.guess-and-config.sub-for-sw64.patch | 35 +++++++++++++++++++ redis5.spec | 11 +++++- 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 Add-sw64-support.patch create mode 100644 Update-config.guess-and-config.sub-for-sw64.patch diff --git a/Add-sw64-support.patch b/Add-sw64-support.patch new file mode 100644 index 0000000..9fb014a --- /dev/null +++ b/Add-sw64-support.patch @@ -0,0 +1,25 @@ +From: zhangfeilong +Date: Wed, 24 Sep 2025 16:10:31 +0800 +Subject: [PATCH] Add sw64 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 __sw_64__ ++# define LG_QUANTUM 4 ++# endif + # ifdef __le32__ + # define LG_QUANTUM 4 + # endif +-- +2.27.0 + diff --git a/Update-config.guess-and-config.sub-for-sw64.patch b/Update-config.guess-and-config.sub-for-sw64.patch new file mode 100644 index 0000000..6b1d99b --- /dev/null +++ b/Update-config.guess-and-config.sub-for-sw64.patch @@ -0,0 +1,35 @@ +From: zhangfeilong +Date: Wed, 24 Sep 2025 16:10:31 +0800 +Subject: [PATCH] Add sw64 support + +--- +--- a/deps/jemalloc/build-aux/config.guess 2021-10-04 18:58:43.000000000 +0800 ++++ b/deps/jemalloc/build-aux/config.guess 2025-09-24 16:16:09.011182745 +0800 +@@ -1053,6 +1053,9 @@ + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; +--- a/deps/jemalloc/build-aux/config.sub 2021-10-04 18:58:43.000000000 +0800 ++++ b/deps/jemalloc/build-aux/config.sub 2025-09-24 16:18:15.094412764 +0800 +@@ -311,6 +311,7 @@ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ ++ | sw_64 \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ +@@ -441,6 +442,7 @@ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ ++ | sw_64*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ diff --git a/redis5.spec b/redis5.spec index d7456bf..7b123ff 100644 --- a/redis5.spec +++ b/redis5.spec @@ -6,7 +6,7 @@ %global Pname redis Name: redis5 Version: 5.0.14 -Release: 4 +Release: 5 Summary: A persistent key-value database License: BSD and MIT URL: https://redis.io @@ -29,6 +29,8 @@ Patch0003: Add-loongarch64-support.patch Patch0004: Update-config.guess-and-config.sub.patch Patch0005: fix-CVE-2024-46981.patch +Patch0006: Add-sw64-support.patch +Patch0007: Update-config.guess-and-config.sub-for-sw64.patch BuildRequires: gcc %if %{with tests} @@ -95,6 +97,10 @@ tar -xvf %{SOURCE10} %patch0004 -p1 %endif %patch0005 -p1 +%ifarch sw_64 +%patch0006 -p1 +%patch0007 -p1 +%endif mv ../%{Pname}-doc-%{doc_commit} doc mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/hiredis/COPYING COPYING-hiredis @@ -199,6 +205,9 @@ exit 0 %{_docdir}/%{Pname} %changelog +* Wed Sep 24 2025 zhangfeilong - 5.0.14-5 +- add sw64 support. + * Thu Apr 17 2025 maoyanping - 5.0.14-4 - Backport to fix CVE-2024-46981 -- Gitee