diff --git a/gperftools.spec b/gperftools.spec index 1312f048268a1337bba057aa2dd9ec7f9f515dd7..c48d303874149bcc5604066df63e29ec0ab624a3 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,6 +1,6 @@ Name: gperftools Version: 2.15 -Release: 3 +Release: 4 Summary: high-performance malloc and performance analysis tools License: BSD-3-Clause @@ -12,6 +12,7 @@ Patch9000: skip-arm-in-stacktrace_unittest.patch #https://github.com/gperftools/gperftools/issues/890 Patch9001: skip-heapchecker-in-arm-arch.patch Patch9002: add-sw_64-support.patch +Patch9003: skip-fail-tests-on-loongarch64.patch BuildRequires: autoconf automake gcc-c++ BuildRequires: libtool libunwind-devel perl-generators @@ -109,6 +110,9 @@ LD_LIBRARY_PATH=./.libs make check %{_mandir}/man1/*.1.gz %changelog +* Wed Jun 04 2025 Wenlong Zhang - 2.15-4 +- skip fail tests on loongarch64 + * Mon Mar 03 2025 maqi - 2.15-3 - Add sw_64 support diff --git a/skip-fail-tests-on-loongarch64.patch b/skip-fail-tests-on-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..8d4be2d55e5257344e5bebc4c9b339669db37d5d --- /dev/null +++ b/skip-fail-tests-on-loongarch64.patch @@ -0,0 +1,123 @@ +From f1d726dae69bf216b6e03bf839ef6aa7cd30bd7d Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 4 Jun 2025 00:56:48 +0000 +Subject: [PATCH] skip fail tests on loongarch64 + +--- + Makefile.am | 18 ++++++++++++++++++ + configure.ac | 5 +++++ + 2 files changed, 23 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index e9ca271..55de456 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -473,7 +473,9 @@ LIBS_TO_WEAKEN += libtcmalloc_minimal.la + ## malloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) + ## malloc_unittest_LDADD = $(PTHREAD_LIBS) + ++if !LOONGARCH64 + TESTS += tcmalloc_minimal_unittest ++endif + WINDOWS_PROJECTS += vsprojects/tcmalloc_minimal_unittest/tcmalloc_minimal_unittest.vcxproj + tcmalloc_minimal_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ + src/tests/testutil.h src/tests/testutil.cc \ +@@ -638,7 +640,9 @@ memalign_unittest_LDADD = libtcmalloc_minimal.la $(PTHREAD_LIBS) + endif !OSX + endif !MINGW + ++if !LOONGARCH64 + TESTS += page_heap_test ++endif + WINDOWS_PROJECTS += vsprojects/page_heap_test/page_heap_test.vcxproj + page_heap_test_SOURCES = src/tests/page_heap_test.cc \ + src/config_for_unittests.h \ +@@ -747,7 +751,9 @@ LIBS_TO_WEAKEN += libtcmalloc_minimal_debug.la + + ### Unittests + ++if !LOONGARCH64 + TESTS += tcmalloc_minimal_debug_unittest ++endif + tcmalloc_minimal_debug_unittest_SOURCES = $(tcmalloc_minimal_unittest_SOURCES) + tcmalloc_minimal_debug_unittest_CXXFLAGS = $(tcmalloc_minimal_unittest_CXXFLAGS) \ + -DDEBUGALLOCATION +@@ -945,7 +951,9 @@ LIBS_TO_WEAKEN += libtcmalloc.la + + ### Unittests + ++if !LOONGARCH64 + TESTS += tcmalloc_unittest.sh$(EXEEXT) ++endif + tcmalloc_unittest_sh_SOURCES = src/tests/tcmalloc_unittest.sh + noinst_SCRIPTS += $(tcmalloc_unittest_sh_SOURCES) + tcmalloc_unittest.sh$(EXEEXT): $(top_srcdir)/$(tcmalloc_unittest_sh_SOURCES) \ +@@ -1009,7 +1017,9 @@ tcmalloc_both_unittest_ladd = $(LIBTCMALLOC) libtcmalloc_minimal.la \ + liblogging.la $(PTHREAD_LIBS) + endif !WITH_CPU_PROFILER + if !OSX ++if !LOONGARCH64 + TESTS += tcmalloc_both_unittest ++endif + tcmalloc_both_unittest_SOURCES = $(tcmalloc_both_unittest_srcs) + tcmalloc_both_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags) + tcmalloc_both_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags) +@@ -1114,7 +1124,9 @@ heap-checker-death_unittest.sh$(EXEEXT): $(heap_checker_death_unittest_sh_SOURCE + cp -p $(top_srcdir)/$(heap_checker_death_unittest_sh_SOURCES) $@ + + # These are sub-programs used by heap-checker_unittest.sh ++if !LOONGARCH64 + TESTS += heap-checker_unittest ++endif + HEAP_CHECKER_UNITTEST_INCLUDES = src/config_for_unittests.h \ + src/memory_region_map.h \ + src/base/commandlineflags.h \ +@@ -1164,7 +1176,9 @@ LIBS_TO_WEAKEN += libtcmalloc_debug.la + + ### Unittests + ++if !LOONGARCH64 + TESTS += tcmalloc_debug_unittest ++endif + tcmalloc_debug_unittest_SOURCES = $(tcmalloc_unittest_SOURCES) + tcmalloc_debug_unittest_CXXFLAGS = $(tcmalloc_unittest_CXXFLAGS) \ + -DDEBUGALLOCATION +@@ -1215,7 +1229,9 @@ endif WITH_HEAP_PROFILER + + if WITH_HEAP_CHECKER + ++if !LOONGARCH64 + TESTS += heap-checker_debug_unittest ++endif + heap_checker_debug_unittest_SOURCES = $(heap_checker_unittest_SOURCES) + heap_checker_debug_unittest_CXXFLAGS = $(heap_checker_unittest_CXXFLAGS) + heap_checker_debug_unittest_LDFLAGS = $(heap_checker_unittest_LDFLAGS) +@@ -1359,7 +1375,9 @@ libtcmalloc_and_profiler_la_LDFLAGS = $(PTHREAD_CFLAGS) \ + # specify it twice causes link-time duplicate-definition errors. :-( + libtcmalloc_and_profiler_la_LIBADD = $(libtcmalloc_la_LIBADD) + ++if !LOONGARCH64 + TESTS += tcmalloc_and_profiler_unittest ++endif + tcmalloc_and_profiler_unittest_SOURCES = $(tcmalloc_both_unittest_srcs) + tcmalloc_and_profiler_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags) + tcmalloc_and_profiler_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags) +diff --git a/configure.ac b/configure.ac +index c5422e0..3e5ffa9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,6 +5,11 @@ + AC_PREREQ([2.69]) + + AC_INIT([gperftools],[2.15],[gperftools@googlegroups.com]) ++ ++AC_PROG_CC ++AC_CANONICAL_HOST ++AM_CONDITIONAL(LOONGARCH64, test "$host_cpu" = loongarch64) ++ + # Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B) + # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html + TCMALLOC_SO_VERSION=9:16:5 +-- +2.43.0 +