|
|
306289 |
diff -up gperftools-2.7.90/configure.ac.dynload gperftools-2.7.90/configure.ac
|
|
|
306289 |
--- gperftools-2.7.90/configure.ac.dynload 2020-03-09 10:55:12.212374186 -0400
|
|
|
306289 |
+++ gperftools-2.7.90/configure.ac 2020-03-09 10:57:25.081830867 -0400
|
|
|
306289 |
@@ -665,6 +665,17 @@ AS_IF([test "x$enable_aggressive_decommi
|
|
|
306289 |
1,
|
|
|
306289 |
[enable aggressive decommit by default])])
|
|
|
306289 |
|
|
|
306289 |
+# Enable generic dynamic TLS model by default
|
|
|
306289 |
+default_enable_generic_dynamic_tls=yes
|
|
|
306289 |
+AC_ARG_ENABLE([general-dynamic-tls],
|
|
|
306289 |
+ [AS_HELP_STRING([--disable-general-dynamic-tls],
|
|
|
306289 |
+ [Do not use the general dynamic TLS model])],
|
|
|
306289 |
+ [],
|
|
|
306289 |
+ [enable_generic_dynamic_tls="$default_enable_generic_dynamic_tls"])
|
|
|
306289 |
+AS_IF([test "x$enable_generic_dynamic_tls" = xyes],
|
|
|
306289 |
+ [AC_DEFINE([ENABLE_GENERIC_DYNAMIC_TLS], 1,
|
|
|
306289 |
+ [Use the generic dynamic TLS model])])
|
|
|
306289 |
+
|
|
|
306289 |
# Write generated configuration file
|
|
|
306289 |
AC_CONFIG_FILES([Makefile
|
|
|
306289 |
src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h])
|
|
|
306289 |
diff -up gperftools-2.7.90/src/base/basictypes.h.dynload gperftools-2.7.90/src/base/basictypes.h
|
|
|
306289 |
--- gperftools-2.7.90/src/base/basictypes.h.dynload 2020-02-23 15:15:47.000000000 -0500
|
|
|
306289 |
+++ gperftools-2.7.90/src/base/basictypes.h 2020-03-09 10:55:12.212374186 -0400
|
|
|
306289 |
@@ -200,7 +200,7 @@ struct CompileAssert {
|
|
|
306289 |
# define ATTRIBUTE_UNUSED
|
|
|
306289 |
#endif
|
|
|
306289 |
|
|
|
306289 |
-#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS)
|
|
|
306289 |
+#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) && defined(ENABLE_GENERIC_DYNAMIC_TLS)
|
|
|
306289 |
#define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec")))
|
|
|
306289 |
#else
|
|
|
306289 |
#define ATTR_INITIAL_EXEC
|