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