diff --git a/add-sw_64-support.patch b/add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..392fd617884c2e20ab9963d9b912550a0890be26 --- /dev/null +++ b/add-sw_64-support.patch @@ -0,0 +1,78 @@ +diff --git a/deps/jemalloc/build-aux/config.guess b/deps/jemalloc/build-aux/config.guess +index 2e9ad7f..39877f2 100755 +--- a/deps/jemalloc/build-aux/config.guess ++++ b/deps/jemalloc/build-aux/config.guess +@@ -915,6 +915,14 @@ EOF + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff --git a/deps/jemalloc/build-aux/config.sub b/deps/jemalloc/build-aux/config.sub +index dd2ca93..bbc1e5a 100755 +--- a/deps/jemalloc/build-aux/config.sub ++++ b/deps/jemalloc/build-aux/config.sub +@@ -248,6 +248,7 @@ case $basic_machine in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | sw_64 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -372,6 +373,7 @@ case $basic_machine in + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | sw_64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ +diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h +index 1b750b1..2f09869 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 2f351a1..7d81fe3 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -155,7 +155,8 @@ 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 + +@@ -225,6 +226,10 @@ void setproctitle(const char *fmt, ...); + #define __arm64__ + #endif + ++#if defined (__sw_64__) ++#define __sw_64__ ++#endif ++ + /* Make sure we can test for SPARC just checking for __sparc__. */ + #if defined(__sparc) && !defined(__sparc__) + #define __sparc__ diff --git a/redis6.spec b/redis6.spec index b291431bca9e2af36b91bdbb627f9ac8e25f213c..ab65bc21bd51e68cc663a2e097e239721e6e7219 100644 --- a/redis6.spec +++ b/redis6.spec @@ -6,7 +6,7 @@ %global Pname redis Name: redis6 Version: 6.2.7 -Release: 3 +Release: 4 Summary: A persistent key-value database License: BSD and MIT URL: https://redis.io @@ -20,11 +20,11 @@ Source9: macros.%{Pname} Source10: https://github.com/%{Pname}/%{Pname}-doc/archive/%{doc_commit}/%{Pname}-doc-%{short_doc_commit}.tar.gz Patch0001: Modify-aarch64-architecture-jemalloc-page-size-from-from-4k-to-64k.patch - +Patch0002: fix-help-info.patch Patch0003: Add-loongarch64-support.patch Patch0004: Update-config.guess-and-config.sub.patch +Patch0005: add-sw_64-support.patch -Patch0002: fix-help-info.patch BuildRequires: make gcc %if %{with tests} BuildRequires: procps-ng tcl @@ -91,6 +91,9 @@ tar -xvf %{SOURCE10} %patch0003 -p1 %patch0004 -p1 %endif +%ifarch sw_64 +%patch0005 -p1 +%endif mv ../%{Pname}-doc-%{doc_commit} doc mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -219,6 +222,9 @@ fi %{_docdir}/%{Pname} %changelog +* Fri Mar 07 2025 mahailiang - 6.2.7-4 +- add sw_64 support + * Wed Apr 10 2024 jiangxinyu - 6.2.7-3 - add Conflicts with redis and redis5