From 0ac815ed2158a9fc9c44c815af717b01c6ea72a7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 16 Jan 2018 19:01:36 +0200 Subject: [PATCH 1/4] Add clang++-libc++, g++ 4.4, g++ 4.6 to Travis --- .travis.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2668f56d..0bb59050 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Copyright 2016, 2017 Peter Dimov +# Copyright 2016, 2017, 2018 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -25,6 +25,26 @@ matrix: - os: linux env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 + - os: linux + compiler: g++-4.4 + env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x + addons: + apt: + packages: + - g++-4.4 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-4.6 + env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x + addons: + apt: + packages: + - g++-4.6 + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 addons: @@ -163,6 +183,14 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-5.0 + - os: linux + compiler: clang++-libc++ + env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z + addons: + apt: + packages: + - libc++-dev + - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode9.1 From 3143e185c600553da8b9312c49449d36f4e34b5c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 17 Jan 2018 19:27:38 +0200 Subject: [PATCH 2/4] Disable config_test_no_rtti on g++ 4.4 -std=c++0x --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9f1e4ea4..efde04f0 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -59,6 +59,7 @@ test-suite config : #input-files : #requirements off + gcc-4.4,0x:no # does not compile with -fno-rtti [ check-target-builds has_atomic_lib : atomic ] [ check-target-builds has_pthread_lib : pthread ] [ check-target-builds has_rt_lib : rt ] From 2617671fd26dbfa13c059e2df18b658cb289c2e8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 18 Jan 2018 00:47:00 +0200 Subject: [PATCH 3/4] Use full g++ 4.4 version (4.4.7) --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index efde04f0..faddf7d2 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -59,7 +59,7 @@ test-suite config : #input-files : #requirements off - gcc-4.4,0x:no # does not compile with -fno-rtti + gcc-4.4.7,0x:no # does not compile with -fno-rtti [ check-target-builds has_atomic_lib : atomic ] [ check-target-builds has_pthread_lib : pthread ] [ check-target-builds has_rt_lib : rt ] From 9d3cef6dba2a199ba45f579d9c84c298e85c327c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 18 Jan 2018 21:45:06 +0200 Subject: [PATCH 4/4] Define BOOST_NO_CXX11_THREAD_LOCAL for libc++ on Linux --- include/boost/config/stdlib/libcpp.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 3d3f4ae4..1e77dca3 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -113,6 +113,13 @@ # define BOOST_NO_CXX11_THREAD_LOCAL #endif +#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) +// After libc++-dev is installed on Trusty, clang++-libc++ almost works, +// except uses of `thread_local` fail with undefined reference to +// `__cxa_thread_atexit`. +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX