Skip to content

Commit 9e15329

Browse files
patch
1 parent 761e460 commit 9e15329

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

depends/packages/boost.mk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ $(package)_sha256_hash=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff02
77
# Optional patch
88
$(package)_patches += bootstrap-clang-darwin.patch
99

10+
ifeq ($(host_os),darwin)
11+
$(package)_patches += use-libcxx-v1.patch
12+
endif
13+
14+
1015
define $(package)_set_vars
1116
$(package)_config_opts_release=variant=release
1217
$(package)_config_opts_debug=variant=debug
@@ -25,7 +30,7 @@ $(package)_config_opts_i686_linux=address-model=32 architecture=x86
2530
$(package)_toolset_$(host_os)=gcc
2631
$(package)_archiver_$(host_os)=$($(package)_ar)
2732

28-
# darwin override
33+
# Darwin override
2934
$(package)_toolset_darwin=clang
3035
$(package)_archiver_darwin=$($(package)_ar)
3136

@@ -38,8 +43,7 @@ $(package)_config_libraries=chrono,filesystem,program_options,system,thread
3843
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
3944
$(package)_cxxflags_linux=-fPIC
4045

41-
$(package)_cppflags+= --sysroot=$(OSX_SDK_PATH)
42-
$(package)_cflags+= --sysroot=$(OSX_SDK_PATH)
46+
# sysroot is passed by toolchain, NOT duplicated here
4347
$(package)_ldflags+= -Wl,-syslibroot,$(OSX_SDK_PATH)
4448
endef
4549

@@ -51,7 +55,7 @@ ifeq ($(host_os),darwin)
5155

5256
define $(package)_preprocess_cmds
5357
echo "using clang : : clang++ -target x86_64-apple-darwin11 --sysroot=$(OSX_SDK_PATH) -stdlib=libc++ -mmacosx-version-min=10.8 \
54-
: <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags) -stdlib=libc++ -isystem$(OSX_SDK_PATH)/usr/include/c++/v1\" \
58+
: <cxxflags>\"$($(package)_cxxflags) -stdlib=libc++ -isystem$(OSX_SDK_PATH)/usr/include/c++/v1\" \
5559
<linkflags>\"$($(package)_ldflags) -stdlib=libc++\" \
5660
<archiver>\"$(host_AR)\" \
5761
<ranlib>\"$(host_RANLIB)\" \
@@ -63,7 +67,7 @@ else
6367

6468
define $(package)_preprocess_cmds
6569
echo "using gcc : : $($(package)_cxx) \
66-
: <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" \
70+
: <cxxflags>\"$($(package)_cxxflags)\" \
6771
<linkflags>\"$($(package)_ldflags)\" \
6872
<archiver>\"$($(package)_ar)\" \
6973
<ranlib>\"$(host_RANLIB)\" \
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- a/tools/build/src/tools/clang-darwin.jam
2+
+++ b/tools/build/src/tools/clang-darwin.jam
3+
@@ -150,7 +150,7 @@ rule init ( version ? : command * : options * )
4+
# Standard include paths
5+
- flags compile.c++ OPTIONS <cxxflags>"-isystem$(macosx.sdkroot)/usr/include/c++/4.2.1" ;
6+
+ flags compile.c++ OPTIONS <cxxflags>"-isystem$(macosx.sdkroot)/usr/include/c++/v1" ;
7+
8+
# Force libc++
9+
flags compile.c++ OPTIONS <cxxflags>"-stdlib=libc++" ;

0 commit comments

Comments
 (0)