1 Star 0 Fork 26

src-oepkgs-oE-rv/gperftools

forked from src-openEuler/gperftools 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gperftools-generic-dynamic-tls.patch 1.75 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/gperftools.git
git@gitee.com:src-oepkgs-oe-rv/gperftools.git
src-oepkgs-oe-rv
gperftools
gperftools
master

搜索帮助