From 3e23d9124bed27ca7ad5b951b8956f690771aa76 Mon Sep 17 00:00:00 2001 From: wzx Date: Sat, 22 Oct 2022 09:54:50 +0800 Subject: [PATCH 1/4] Add sw64 architecture Signed-off-by: wzx (cherry picked from commit 3cbd565ae42112fdf080f308073fa2a25dd94293) --- jemalloc-5.2.1-sw.patch | 59 +++++++++++++++++++++++++++++++++++++++++ jemalloc.spec | 5 +++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100755 jemalloc-5.2.1-sw.patch diff --git a/jemalloc-5.2.1-sw.patch b/jemalloc-5.2.1-sw.patch new file mode 100755 index 0000000..c5e694f --- /dev/null +++ b/jemalloc-5.2.1-sw.patch @@ -0,0 +1,59 @@ +diff -Naur jemalloc-5.2.1.org/build-aux/config.guess jemalloc-5.2.1.sw/build-aux/config.guess +--- jemalloc-5.2.1.org/build-aux/config.guess 2019-08-05 20:02:00.000000000 +0000 ++++ jemalloc-5.2.1.sw/build-aux/config.guess 2022-02-25 06:55:20.420000000 +0000 +@@ -915,6 +945,15 @@ + 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 ++ SW6A) UNAME_MACHINE=sw_64sw6a ;; ++ SW6B) UNAME_MACHINE=sw_64sw6b ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +@@ -1391,6 +1430,7 @@ + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; ++ S*) echo sw_64-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; +diff -Naur jemalloc-5.2.1.org/build-aux/config.sub jemalloc-5.2.1.sw/build-aux/config.sub +--- jemalloc-5.2.1.org/build-aux/config.sub 2019-08-05 20:02:00.000000000 +0000 ++++ jemalloc-5.2.1.sw/build-aux/config.sub 2022-02-25 06:55:20.420000000 +0000 +@@ -250,6 +250,7 @@ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ ++ | sw_64 | sw_64sw6a | sw_64sw6b \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ +@@ -375,6 +376,7 @@ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ ++ | sw_64-* | sw_64sw6a-* | sw_64sw6b-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ +diff -Naur jemalloc-5.2.1.org/include/jemalloc/internal/quantum.h jemalloc-5.2.1.sw/include/jemalloc/internal/quantum.h +--- jemalloc-5.2.1.org/include/jemalloc/internal/quantum.h 2019-08-05 20:02:00.000000000 +0000 ++++ jemalloc-5.2.1.sw/include/jemalloc/internal/quantum.h 2022-02-25 06:55:20.440000000 +0000 +@@ -15,6 +15,9 @@ + # 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/jemalloc.spec b/jemalloc.spec index 8fab9f2..5ee0f8d 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -12,7 +12,7 @@ Name: jemalloc Version: 5.2.1 -Release: 1 +Release: 2 Summary: General-purpose scalable concurrent malloc implementation License: BSD URL: http://www.canonware.com/jemalloc/ @@ -82,6 +82,9 @@ make check %{_mandir}/man3/jemalloc.3* %changelog +* Fri Oct 21 2022 wuzx - 5.2.1-2 +- add sw64 patch + * Thu Dec 30 2021 xigaoxinyan - 5.2.1-1 - Update jemlloc -- Gitee From fc29f73afca0dbd7cf391202ef70c5df44b6b521 Mon Sep 17 00:00:00 2001 From: wuzx <471319475@qq.com> Date: Tue, 29 Nov 2022 03:02:48 +0000 Subject: [PATCH 2/4] update jemalloc.spec. Signed-off-by: wuzx <471319475@qq.com> --- jemalloc.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jemalloc.spec b/jemalloc.spec index 5ee0f8d..7aa2992 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -21,6 +21,7 @@ Source0: https://github.com/jemalloc/%{name}/releases/download/%{version} Patch1: backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch Patch2: backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch Patch3: backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch +Patch4: mstflint-4.10.0-sw.patch BuildRequires: libxslt perl-generators gcc %description @@ -41,6 +42,9 @@ The help package contains manual pages and other related files for jemalloc. %prep %autosetup -p1 +%ifnarch sw_64 +%patch4 -R -p1 +%endif %build export LDFLAGS="%{?__global_ldflags} -lrt" -- Gitee From 2ac9c5475623324424efd3103ffd890325016b49 Mon Sep 17 00:00:00 2001 From: wuzx <471319475@qq.com> Date: Thu, 1 Dec 2022 01:09:59 +0000 Subject: [PATCH 3/4] update jemalloc.spec. Signed-off-by: wuzx <471319475@qq.com> --- jemalloc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jemalloc.spec b/jemalloc.spec index 7aa2992..c2aebb2 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -41,9 +41,12 @@ Summary: help for jemalloc. The help package contains manual pages and other related files for jemalloc. %prep -%autosetup -p1 -%ifnarch sw_64 -%patch4 -R -p1 +%setup +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%ifarch sw_64 +%patch4 -p1 %endif %build -- Gitee From a76b7733b0b6c32343c2430d4e6d0dcd55166c73 Mon Sep 17 00:00:00 2001 From: wuzx <471319475@qq.com> Date: Thu, 22 Dec 2022 07:32:48 +0000 Subject: [PATCH 4/4] update jemalloc.spec. Signed-off-by: wuzx <471319475@qq.com> --- jemalloc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jemalloc.spec b/jemalloc.spec index c2aebb2..51c806d 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -21,7 +21,7 @@ Source0: https://github.com/jemalloc/%{name}/releases/download/%{version} Patch1: backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch Patch2: backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch Patch3: backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch -Patch4: mstflint-4.10.0-sw.patch +Patch4: jemalloc-5.2.1-sw.patch BuildRequires: libxslt perl-generators gcc %description -- Gitee