diff options
author | alkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2013-03-11 19:16:47 +0000 |
---|---|---|
committer | alkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2013-03-11 19:16:47 +0000 |
commit | 7896dcb9db2375fcd1d8d19052985a12ad113ba9 (patch) | |
tree | 611739f00122e41604d6808a19000b6da6eff550 | |
parent | 8bf4522aa53a7b612a865bc10716192f0f05314b (diff) | |
download | gperftools-7896dcb9db2375fcd1d8d19052985a12ad113ba9.tar.gz |
issue-504: disable tls on mingw
Which is known to fail.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@207 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
-rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 5e168ab..033f224 100644 --- a/configure.ac +++ b/configure.ac @@ -295,10 +295,18 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], # Note, however, that our code tickles a bug in gcc < 4.1.2 # involving TLS and -fPIC (which our libraries will use) on x86: # http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html +# +# And mingw also does compile __thread but resultant code actually +# fails to work correctly at least in some not so ancient version: +# http://mingw-users.1079350.n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-amp-thread-specifier-not-working-td3440749.html AC_MSG_CHECKING([for __thread]) AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2)) #error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html -#endif], [static __thread int p = 0])], +#endif +#if defined(__MINGW32__) +#error mingw doesn't really support tls +#endif +], [static __thread int p = 0])], [AC_DEFINE(HAVE_TLS, 1, Define to 1 if compiler supports __thread) AC_MSG_RESULT([yes])], |