From b24ad05ffe4347ed2ea52c31e3a724e24c990611 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 18 Aug 2016 18:24:24 +0100 Subject: [PATCH 1/3] There is no pthread_yield on Android. --- include/boost/config/platform/linux.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/platform/linux.hpp b/include/boost/config/platform/linux.hpp index 6fa5f45b..8c43c7b6 100644 --- a/include/boost/config/platform/linux.hpp +++ b/include/boost/config/platform/linux.hpp @@ -72,7 +72,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H #include -#ifdef __USE_GNU +#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID) #define BOOST_HAS_PTHREAD_YIELD #endif From 221f4da6d1b7f742afa136cf929ba388e11bc5a3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 18 Aug 2016 18:34:51 +0100 Subject: [PATCH 2/3] Try to fix constexpr test case for both C++11 and C++14 variations. --- test/boost_no_constexpr.ipp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/boost_no_constexpr.ipp b/test/boost_no_constexpr.ipp index 7b601379..35ac4891 100644 --- a/test/boost_no_constexpr.ipp +++ b/test/boost_no_constexpr.ipp @@ -32,7 +32,13 @@ private: template struct X { }; + +#if __cplusplus < 201400L +// Some C++14 compilers reject this (clang), some C++11 compilers reject "constexpr const" (GCC-4.6) +constexpr A a = 42; +#else constexpr const A a = 42; +#endif X xx; // OK: unique conversion to int From 226bee3010a62446168fd05c77bd3bcdd1c529fd Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 18 Aug 2016 19:26:28 +0100 Subject: [PATCH 3/3] 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