From cdfa925095f204f28b9cb447b2a64641ad68a265 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 12 Jun 2017 19:38:54 +0100 Subject: [PATCH 1/9] Allow stdint.h for compilers other than gcc when building on linux with a recent glibc version. See https://svn.boost.org/trac/boost/ticket/13045. --- include/boost/config/platform/linux.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/config/platform/linux.hpp b/include/boost/config/platform/linux.hpp index db54677e..c4eef8f8 100644 --- a/include/boost/config/platform/linux.hpp +++ b/include/boost/config/platform/linux.hpp @@ -24,8 +24,9 @@ #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) // defines int64_t unconditionally, but defines // int64_t only if __GNUC__. Thus, assume a fully usable - // only when using GCC. -# if defined __GNUC__ + // only when using GCC. Update 2017: this appears not to be the case for + // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045 +# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5))) # define BOOST_HAS_STDINT_H # endif #endif From e56e24f0a3f0115842a2361f8073cb3e8b0f51c5 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 14 Jun 2017 19:32:59 +0100 Subject: [PATCH 2/9] gcc.hpp: Mingw has broken thread_local support. See https://sourceforge.net/p/mingw-w64/bugs/527/ --- include/boost/config/compiler/gcc.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index da05a63e..d1cfed7a 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -303,6 +303,13 @@ # define BOOST_FALLTHROUGH __attribute__((fallthrough)) #endif +#ifdef __MINGW32__ +// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see +// https://sourceforge.net/p/mingw-w64/bugs/527/ +// Not setting this causes program termination on thread exit. +#define BOOST_NO_CXX11_THREAD_LOCAL +#endif + // // Unused attribute: #if __GNUC__ >= 4 From 573c1a50275101978166dabc3cb4322465b8fd50 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 14 Jun 2017 19:42:21 +0100 Subject: [PATCH 3/9] Tentative fix for clang-3.0 failing config_test: It appears not to completely support variadic template expansion. --- include/boost/config/compiler/clang.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 46ccbb68..157a94d2 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -310,6 +310,11 @@ #define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif +#if (__clang_major__ == 3) && (__clang_minor__ == 0) +// Apparently a clang bug: +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + // Clang has supported the 'unused' attribute since the first release. #define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) From 08c7f03f2980ebec50a903025d35f6c60e33c3b3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 14 Jun 2017 19:49:11 +0100 Subject: [PATCH 4/9] Add android detection macros to config_info output. --- test/config_info.cpp | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/test/config_info.cpp b/test/config_info.cpp index 3fe9d9df..a7863f42 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -344,6 +344,10 @@ void print_compiler_macros() PRINT_MACRO(__CUDACC_VER_MINOR__); PRINT_MACRO(__CUDACC_VER_BUILD__); PRINT_MACRO(__CUDACC_VER__); + + // Android: + PRINT_MACRO(ANDROID); + PRINT_MACRO(__ANDROID__); } void print_stdlib_macros() @@ -1135,35 +1139,6 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_USING_TEMPLATE); PRINT_MACRO(BOOST_NO_VOID_RETURNS); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); From 9910b354e52070f4cfe188ce9b27aaa3665d6888 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Jun 2017 13:04:18 +0100 Subject: [PATCH 5/9] CUDA: disable some C++11 and 14 features which aren't supported when compiling as a .cu file. --- include/boost/config/compiler/nvcc.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index b31d4f4f..283b7803 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -30,3 +30,19 @@ #if defined(_MSC_VER) # define BOOST_NO_CXX11_CONSTEXPR #endif + +#ifdef __CUDACC__ +// +// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc: +// +#if defined(_MSC_VER) +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif +// +// And this one effects the NVCC front end: +// +#define BOOST_NO_CXX11_NOEXCEPT + +#endif + From 6415a2cd43c7b6681c0fdf361d1162d8d25bd743 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Jun 2017 17:53:14 +0100 Subject: [PATCH 6/9] Restrict last fix to CUDA 8 only - other versions are apparently unaffected. --- include/boost/config/compiler/nvcc.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index 283b7803..7729d2c2 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -42,7 +42,9 @@ // // And this one effects the NVCC front end: // -#define BOOST_NO_CXX11_NOEXCEPT +#if (__CUDACC_VER__ >= 80000) && (__CUDACC_VER__ < 80100) +# define BOOST_NO_CXX11_NOEXCEPT +#endif #endif From 7e4a1c85b7c834cfc8a903f64d9225fac09c24cf Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Jun 2017 17:54:41 +0100 Subject: [PATCH 7/9] Add link to bug report in comment. [ci skip] --- include/boost/config/compiler/nvcc.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index 7729d2c2..43039b5c 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -40,7 +40,8 @@ # define BOOST_NO_CXX11_UNICODE_LITERALS #endif // -// And this one effects the NVCC front end: +// And this one effects the NVCC front end, +// See https://svn.boost.org/trac/boost/ticket/13049 // #if (__CUDACC_VER__ >= 80000) && (__CUDACC_VER__ < 80100) # define BOOST_NO_CXX11_NOEXCEPT From 1e544eae215721290e1f019544083e19d45f81da Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Sun, 6 Aug 2017 17:53:56 -0700 Subject: [PATCH 8/9] Add code to set for BOOST_NO_CXX98_RANDOM_SHUFFLE and BOOST_NO_CXX98_BINDERS correctly --- include/boost/config/stdlib/libcpp.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 9f3d259e..a3cc523c 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -96,6 +96,12 @@ #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) # define BOOST_NO_AUTO_PTR #endif +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) +# define BOOST_NO_CXX98_RANDOM_SHUFFLE +#endif +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) +# define BOOST_NO_CXX98_BINDERS +#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 From 9e51aa81ca4c6be6f6af953dc97b9e9c942cc701 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 7 Aug 2017 06:11:30 -0700 Subject: [PATCH 9/9] Fix copy-paste-o Now checks `_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS` instead. --- include/boost/config/stdlib/libcpp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index a3cc523c..9c58965f 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -99,7 +99,7 @@ #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) # define BOOST_NO_CXX98_RANDOM_SHUFFLE #endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) # define BOOST_NO_CXX98_BINDERS #endif