add sw_64 support

Signed-off-by: Hailiang <mahailiang@uniontech.com>
(cherry picked from commit 53becd7806531d54596c9dd2f2b61098574bc687)
This commit is contained in:
Hailiang 2025-03-07 11:21:50 +08:00 committed by openeuler-sync-bot
parent fcabef4d4f
commit 1e92ece7ba
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From 29e18cd8ae93d043436cb28e3a077c7c4a296e07 Mon Sep 17 00:00:00 2001
From: Hailiang <mahailiang@uniontech.com>
Date: Fri, 7 Mar 2025 10:44:48 +0800
Subject: [PATCH] add sw_64 support
---
deps/jemalloc/build-aux/config.guess | 3 +++
deps/jemalloc/build-aux/config.sub | 1 +
deps/jemalloc/include/jemalloc/internal/quantum.h | 3 +++
3 files changed, 7 insertions(+)
diff --git a/deps/jemalloc/build-aux/config.guess b/deps/jemalloc/build-aux/config.guess
index f772702..32ae30a 100755
--- a/deps/jemalloc/build-aux/config.guess
+++ b/deps/jemalloc/build-aux/config.guess
@@ -1102,6 +1102,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
+ sw_64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
tile*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
diff --git a/deps/jemalloc/build-aux/config.sub b/deps/jemalloc/build-aux/config.sub
index b0f8492..ec6bae2 100755
--- a/deps/jemalloc/build-aux/config.sub
+++ b/deps/jemalloc/build-aux/config.sub
@@ -1241,6 +1241,7 @@ case $cpu-$vendor in
| sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
| spu \
+ | sw_64 \
| tahoe \
| thumbv7* \
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
diff --git a/deps/jemalloc/include/jemalloc/internal/quantum.h b/deps/jemalloc/include/jemalloc/internal/quantum.h
index c22d753..3fbef00 100644
--- a/deps/jemalloc/include/jemalloc/internal/quantum.h
+++ b/deps/jemalloc/include/jemalloc/internal/quantum.h
@@ -62,6 +62,9 @@
defined(__SH4_SINGLE_ONLY__))
# define LG_QUANTUM 4
# endif
+# ifdef __sw_64__
+# define LG_QUANTUM 4
+# endif
# ifdef __tile__
# define LG_QUANTUM 4
# endif
--
2.20.1

View File

@ -7,7 +7,7 @@
Name: redis
Version: 7.2.7
Release: 1
Release: 2
Summary: A persistent key-value database
# redis, hiredis: BSD-3-Clause
# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause
@ -24,6 +24,7 @@ Source5: macros.%{name}
Source6: https://github.com/%{name}/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz
# https://github.com/redis/redis/pull/3491 - man pages
Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch
Patch0002: 0002-add-sw_64-support.patch
BuildRequires: systemd
BuildRequires: systemd-devel
@ -49,6 +50,7 @@ Redis is an advanced key-value store. It is often referred to as a dattructure s
%setup -q -n %{name}-%{version} -b 6
mv ../%{name}-doc-%{doc_commit} doc
%patch -P0001 -p1
%patch -P0002 -p1
mv deps/lua/COPYRIGHT COPYRIGHT-lua
mv deps/jemalloc/COPYING COPYING-jemalloc
@ -192,6 +194,9 @@ exit 0
%{_docdir}/%{name}
%changelog
* Fri Mar 07 2025 mahailiang <mahailiang@uniontech.com> - 7.2.7-2
- add sw_64 support
* Wed Feb 12 2025 wangkai <13474090681@163.com> - 7.2.7-1
- Update to 7.2.7
- Fix CVE-2021-32626 CVE-2021-32627 CVE-2021-32762 CVE-2021-32675