diff -up ./configure.ac.dynload ./configure.ac
--- ./configure.ac.dynload	2017-08-24 15:23:01.126622099 -0400
+++ ./configure.ac	2017-08-24 15:29:46.332132222 -0400
@@ -614,6 +614,16 @@ AC_COMPILE_IFELSE(
          AC_MSG_RESULT([yes])],
         [AC_MSG_RESULT([no])])
 
+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 -up ./src/base/basictypes.h.dynload ./src/base/basictypes.h
--- ./src/base/basictypes.h.dynload	2017-08-24 15:30:30.210996293 -0400
+++ ./src/base/basictypes.h	2017-08-24 15:31:01.889176214 -0400
@@ -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
