tcmalloc: drop initial-exec TLS model on arm-gcc in all pending cases

After the initial fix in 67e8d3921f61bded03a45e4c9977589441513e24 the
crashes observed in raspberrypi3 were gone in stable and beta builds,
but not on dev (current master). Debugging pointed out that the
problem was still present because of the tcmalloc code out of
gperftools.

So this change just drops _all_ uses of initial-exec model for
ARM builds using GCC. This fixes the crashes even in current master.

Bug: 973767
Change-Id: Idaec9eb3af0cc688466777b63efc601b77c9e55a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715266
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Original-Commit-Position: refs/heads/master@{#681014}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 121bc0ff3bf8842cb22b44cf78628df514331145
diff --git a/src/base/basictypes.h b/src/base/basictypes.h
index 24a6a8a..3bf59f4 100644
--- a/src/base/basictypes.h
+++ b/src/base/basictypes.h
@@ -200,7 +200,8 @@
 # define ATTRIBUTE_UNUSED
 #endif
 
-#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS)
+#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) && \
+    !(defined(__GNUC__) && !defined(__clang__) && defined(__arm__))
 #define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec")))
 #else
 #define ATTR_INITIAL_EXEC
diff --git a/src/heap-checker.cc b/src/heap-checker.cc
index 8e71f58..918194f 100755
--- a/src/heap-checker.cc
+++ b/src/heap-checker.cc
@@ -445,7 +445,8 @@
 // the cost you can't dlopen this library.  But dlopen on heap-checker
 // doesn't work anyway -- it must run before main -- so this is a good
 // trade-off.
-# ifdef HAVE___ATTRIBUTE__
+# if defined(HAVE___ATTRIBUTE__) && \
+    !(defined(__GNUC__) && !defined(__clang__) && defined(__arm__))
    __attribute__ ((tls_model ("initial-exec")))
 # endif
     ;