diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -708,28 +708,6 @@ ] ) -TEMP_LDFLAGS="$LDFLAGS" -LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" -AC_MSG_CHECKING([for thread_local support]) -AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - static thread_local int foo = 0; - static void run_thread() { foo++;} - int main(){ - for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();} - return foo; - } - ])], - [ - AC_DEFINE(HAVE_THREAD_LOCAL,1,[Define if thread_local is supported.]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - ] -) -LDFLAGS="$TEMP_LDFLAGS" - # Check for different ways of gathering OS randomness AC_MSG_CHECKING(for Linux getrandom syscall) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -116,11 +116,6 @@ check_symbol_exists(M_ARENA_MAX "malloc.h" HAVE_MALLOPT_ARENA_MAX) check_symbol_exists(malloc_info "malloc.h" HAVE_MALLOC_INFO) -# Check for compiler features. -if (cxx_thread_local IN_LIST CMAKE_CXX_COMPILE_FEATURES) - set(HAVE_THREAD_LOCAL 1) -endif() - # Various system libraries check_symbol_exists(strnlen "string.h" HAVE_DECL_STRNLEN) check_symbol_exists(daemon "unistd.h" HAVE_DECL_DAEMON) diff --git a/src/config/bitcoin-config.h.cmake.in b/src/config/bitcoin-config.h.cmake.in --- a/src/config/bitcoin-config.h.cmake.in +++ b/src/config/bitcoin-config.h.cmake.in @@ -49,8 +49,6 @@ #cmakedefine HAVE_MALLOPT_ARENA_MAX 1 #cmakedefine HAVE_MALLOC_INFO 1 -#cmakedefine HAVE_THREAD_LOCAL 1 - #cmakedefine HAVE_DECL_STRNLEN 1 #cmakedefine HAVE_DECL_DAEMON 1 #cmakedefine HAVE_GETENTROPY 1 diff --git a/src/sync.cpp b/src/sync.cpp --- a/src/sync.cpp +++ b/src/sync.cpp @@ -11,10 +11,6 @@ #include #ifdef DEBUG_LOCKCONTENTION -#if !defined(HAVE_THREAD_LOCAL) -static_assert(false, "thread_local is not supported"); -#endif - void PrintLockContention(const char *pszName, const char *pszFile, int nLine) { LogPrintf("LOCKCONTENTION: %s\n", pszName); LogPrintf("Locker: %s:%d\n", pszFile, nLine);