diff --git a/gperftools-generic-dynamic-tls.patch b/gperftools-generic-dynamic-tls.patch new file mode 100644 index 0000000000000000000000000000000000000000..815348000df0899aec7c6ff07a377c3ac5ba2ee2 --- /dev/null +++ b/gperftools-generic-dynamic-tls.patch @@ -0,0 +1,48 @@ +From 2ab82df5d631f5da10da2ff73b515a8aa25fe819 Mon Sep 17 00:00:00 2001 +Date: Tue, 22 Sep 2020 20:38:53 +0800 +Subject: [PATCH] enable-generic-dynamic-tls + +fedora has a patch for aarch64, which fixes this issue https://gitee.com/src-openeuler/gperftools/issues/I1VAEU + +--- + configure.ac | 10 ++++++++++ + src/base/basictypes.h | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 500f8be..b1b12f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -670,6 +670,16 @@ AS_IF([test "x$enable_aggressive_decommit_by_default" = xyes], + 1, + [enable aggressive decommit by default])]) + ++default_enable_generic_dynamic_tls=yes ++AC_ARG_ENABLE([general-dynamic-tls], ++ [AS_HELP_STRING([--disable-general-dynamic-tls], ++ [Do not use the general dynamic TLS model])], ++ [], ++ [enable_generic_dynamic_tls="$default_enable_generic_dynamic_tls"]) ++AS_IF([test "x$enable_generic_dynamic_tls" = xyes], ++ [AC_DEFINE([ENABLE_GENERIC_DYNAMIC_TLS], 1, ++ [Use the generic dynamic TLS model])]) ++ + # Write generated configuration file + AC_CONFIG_FILES([Makefile + src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h]) +diff --git a/src/base/basictypes.h b/src/base/basictypes.h +index 356b3d5..b737d47 100644 +--- a/src/base/basictypes.h ++++ b/src/base/basictypes.h +@@ -200,7 +200,7 @@ struct CompileAssert { + # define ATTRIBUTE_UNUSED + #endif + +-#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) ++#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) && defined(ENABLE_GENERIC_DYNAMIC_TLS) + #define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec"))) + #else + #define ATTR_INITIAL_EXEC +-- +1.8.3.1 + diff --git a/gperftools.spec b/gperftools.spec index 96f56bc38125e7e6ea61f013e811507d21a49d33..44fdf753aa8e74acc7fe10e92feaa4ad7ebea3d7 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,11 +1,12 @@ Name: gperftools Version: 2.8 -Release: 1 +Release: 2 Summary: high-performance malloc and performance analysis tools License: BSD 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 Patch9000: issue-1122-fix-bus-error-on-aarch64.patch BuildRequires: autoconf automake gcc-c++ gdb @@ -98,6 +99,10 @@ make %{_mandir}/man1/*.1.gz %changelog +* Tue Sep 22 2020 liuzixian - 2.8-2 +- Type: bufgix +- Reason: add patch gperftools-generic-dynamic-tls.patch to avoid issue #I1VAEU which is probably caused by compiler bugs. + * Thu Jul 23 2020 jinzhimin - 2.8-1 - update to 2.8