diff --git a/gperftools-2.9.1-sw.patch b/gperftools-2.10-sw.patch old mode 100755 new mode 100644 similarity index 45% rename from gperftools-2.9.1-sw.patch rename to gperftools-2.10-sw.patch index 17b1d93160ea0e9a826307beb9fa1f54208ea5e1..0bdcf45662fa2d1f85db5f908f634ee16f7cef3a --- a/gperftools-2.9.1-sw.patch +++ b/gperftools-2.10-sw.patch @@ -1,10 +1,27 @@ -diff -Naur gperftools-2.9.1.org/config.guess gperftools-2.9.1.sw/config.guess ---- gperftools-2.9.1.org/config.guess 2022-03-10 02:22:50.072357080 +0000 -+++ gperftools-2.9.1.sw/config.guess 2022-03-10 01:51:43.000000000 +0000 -@@ -275,6 +275,36 @@ +From 4ca466e1bb19587ff954ce5508e355ed5a12383e Mon Sep 17 00:00:00 2001 +From: Liu Zixian +Date: Thu, 10 Nov 2022 19:10:37 +0800 +Subject: [PATCH] Suppot for sw arch + +Based on version 2.9.1 from wuzx + +Signed-off-by: Liu Zixian +--- + config.guess | 40 ++++++++++++++++++++++++++++++++++++ + config.sub | 1 + + configure | 1 + + src/base/basictypes.h | 2 ++ + src/malloc_hook_mmap_linux.h | 3 ++- + 5 files changed, 46 insertions(+), 1 deletion(-) + +diff --git a/config.guess b/config.guess +index 7f76b62..abf78f4 100755 +--- a/config.guess ++++ b/config.guess +@@ -313,6 +313,36 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; + sw_64:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) @@ -30,72 +47,67 @@ diff -Naur gperftools-2.9.1.org/config.guess gperftools-2.9.1.sw/config.guess + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. -+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" ++ GUESS="$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 -+ exit $exitcode ;; ++ ;; alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -904,6 +934,15 @@ + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 +@@ -976,6 +1006,15 @@ EOF UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + 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 ;; ++ 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 ++ GUESS="$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; -@@ -1397,6 +1436,7 @@ +@@ -1512,6 +1551,7 @@ EOF 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 ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; ++ S*) GUESS=sw_64-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; -diff -Naur gperftools-2.9.1.org/config.sub gperftools-2.9.1.sw/config.sub ---- gperftools-2.9.1.org/config.sub 2022-03-10 02:22:50.072357080 +0000 -+++ gperftools-2.9.1.sw/config.sub 2022-03-10 01:51:43.000000000 +0000 -@@ -247,6 +247,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] \ -@@ -372,6 +373,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 gperftools-2.9.1.org/configure gperftools-2.9.1.sw/configure ---- gperftools-2.9.1.org/configure 2022-03-10 02:22:50.062357080 +0000 -+++ gperftools-2.9.1.sw/configure 2022-03-10 01:51:43.000000000 +0000 -@@ -18218,6 +18218,7 @@ - pc_fields="$pc_fields uc_mcontext.gregs[REG_RIP]" # Linux (x86_64) +diff --git a/config.sub b/config.sub +index dba16e8..ef3f539 100755 +--- a/config.sub ++++ b/config.sub +@@ -1185,6 +1185,7 @@ case $cpu-$vendor in + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ ++ | sw_64 | sw_64sw6a | sw_64sw6b \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb | arc32 | arc64 \ +diff --git a/configure b/configure +index 4e0684d..2953fe4 100755 +--- a/configure ++++ b/configure +@@ -19496,6 +19496,7 @@ printf %s "checking how to access the program counter from a struct ucontext... pc_fields="$pc_fields uc_mcontext.sc_ip" # Linux (ia64) + pc_fields="$pc_fields uc_mcontext.__pc" # Linux (loongarch64) pc_fields="$pc_fields uc_mcontext.pc" # Linux (mips) + pc_fields="$pc_fields uc_mcontext.sc_pc" # Linux (sw_64) pc_fields="$pc_fields uc_mcontext.uc_regs->gregs[PT_NIP]" # Linux (ppc) pc_fields="$pc_fields uc_mcontext.__gregs[REG_PC]" # Linux (riscv64) pc_fields="$pc_fields uc_mcontext.psw.addr" # Linux (s390) -diff -Naur gperftools-2.9.1.org/src/base/basictypes.h gperftools-2.9.1.sw/src/base/basictypes.h ---- gperftools-2.9.1.org/src/base/basictypes.h 2022-03-10 02:22:50.092357080 +0000 -+++ gperftools-2.9.1.sw/src/base/basictypes.h 2022-03-10 01:51:43.000000000 +0000 -@@ -378,6 +378,8 @@ +diff --git a/src/base/basictypes.h b/src/base/basictypes.h +index a8c9e1c..0ceec52 100644 +--- a/src/base/basictypes.h ++++ b/src/base/basictypes.h +@@ -378,6 +378,8 @@ class AssignAttributeStartEnd { // some ARMs have shorter cache lines (ARM1176JZF-S is 32 bytes for example) but obviously 64-byte aligned implies 32-byte aligned # elif (defined(__mips__)) # define CACHELINE_ALIGNED __attribute__((aligned(128))) @@ -104,15 +116,20 @@ diff -Naur gperftools-2.9.1.org/src/base/basictypes.h gperftools-2.9.1.sw/src/ba # elif (defined(__aarch64__)) # define CACHELINE_ALIGNED __attribute__((aligned(64))) // implementation specific, Cortex-A53 and 57 should have 64 bytes -diff -Naur gperftools-2.9.1.org/src/malloc_hook_mmap_linux.h gperftools-2.9.1.sw/src/malloc_hook_mmap_linux.h ---- gperftools-2.9.1.org/src/malloc_hook_mmap_linux.h 2022-03-10 02:22:50.122357080 +0000 -+++ gperftools-2.9.1.sw/src/malloc_hook_mmap_linux.h 2022-03-10 01:51:43.000000000 +0000 -@@ -56,7 +56,7 @@ +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index c7d8b4b..6de699d 100644 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,8 @@ || defined(__aarch64__) \ + || defined(__loongarch64) \ || (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32)) \ - || defined(__s390__) || (defined(__riscv) && __riscv_xlen == 64) \ -- || defined(__e2k__) -+ || defined(__e2k__) || defined(__sw_64__) +- || defined(__s390__) || (defined(__riscv) && __riscv_xlen == 64) ++ || defined(__s390__) || (defined(__riscv) && __riscv_xlen == 64) \ ++ || defined(__sw_64__) static inline void* do_mmap64(void *start, size_t length, int prot, int flags, +-- +2.36.1 + diff --git a/gperftools-2.10.tar.gz b/gperftools-2.10.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8de8478ad52afdd9f4356c6b01112677e83e76b1 Binary files /dev/null and b/gperftools-2.10.tar.gz differ diff --git a/gperftools-2.9.1.tar.gz b/gperftools-2.9.1.tar.gz deleted file mode 100644 index 4704041bb969bbc510a81804e27ffae0e63f6eae..0000000000000000000000000000000000000000 Binary files a/gperftools-2.9.1.tar.gz and /dev/null differ diff --git a/gperftools.spec b/gperftools.spec index 174c9d853a2a2051880cf1a5a42ec6c774f38e1a..33aebc68b18b61cd5d750fd6dc7cdc0eb095ee3b 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,9 +1,9 @@ Name: gperftools -Version: 2.9.1 -Release: 6 +Version: 2.10 +Release: 1 Summary: high-performance malloc and performance analysis tools -License: BSD +License: BSD-3-Clause URL: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz Patch1: gperftools-generic-dynamic-tls.patch @@ -14,7 +14,7 @@ Patch9002: skip-heapchecker-in-arm-arch.patch Patch9003: avoid-exceed-int-range.patch Patch9004: skip-tcm_asserts_unittest.patch Patch9005: Continue-to-release-span-until-the-end-of-one-round.patch -Patch9006: gperftools-2.9.1-sw.patch +Patch9006: gperftools-2.10-sw.patch BuildRequires: autoconf automake gcc-c++ @@ -110,6 +110,9 @@ LD_LIBRARY_PATH=./.libs make check %{_mandir}/man1/*.1.gz %changelog +* Thu Nov 10 2022 Liu Zixian - 2.10-1 +- Update to 2.10 + * Thu Oct 20 2022 wuzx - 2.9.1-6 - add sw64 patch