From 226bee3010a62446168fd05c77bd3bcdd1c529fd Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 18 Aug 2016 19:26:28 +0100 Subject: [PATCH] Older versions of libc++abi have no thread_local support. --- include/boost/config/stdlib/libcpp.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 645bb63b..096b8c0d 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -75,6 +75,14 @@ #define BOOST_NO_STD_MESSAGES #endif +#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) +// This is a bit of a sledgehammer, because really it's just libc++abi that has no +// support for thread_local, leading to linker errors such as +// "undefined reference to `__cxa_thread_atexit'". It is fixed in the +// most recent releases of libc++abi though... +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX