@@ -4,23 +4,23 @@ $(package)_download_path=https://archives.boost.io/release/1.74.0/source/
44$(package)_file_name =$(package ) _$($(package ) _version) .tar.bz2
55$(package)_sha256_hash =83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
66
7- # Optional patch
7+ # Optional patch (ok to leave)
88$(package)_patches += bootstrap-clang-darwin.patch
99
10+ # Darwin-only libc++ v1 patch
1011ifeq ($(host_os ) ,darwin)
1112$(package)_patches += use-libcxx-v1.patch
1213endif
1314
14-
1515define $(package)_set_vars
1616$(package ) _config_opts_release=variant=release
1717$(package ) _config_opts_debug=variant=debug
1818$(package ) _config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
1919$(package ) _config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
2020
21- # per-platform
21+ # ===== per-platform =====
2222$(package ) _config_opts_linux=threadapi=pthread runtime-link=shared
23- $(package ) _config_opts_darwin=toolset=clang runtime-link=shared
23+ $(package ) _config_opts_darwin=toolset=clang-darwin runtime-link=shared
2424
2525$(package ) _config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
2626$(package ) _config_opts_x86_64_mingw32=address-model=64
@@ -31,62 +31,63 @@ $(package)_toolset_$(host_os)=gcc
3131$(package ) _archiver_$(host_os ) =$($(package ) _ar)
3232
3333# Darwin override
34- $(package ) _toolset_darwin=clang
34+ $(package ) _toolset_darwin=clang-darwin
3535$(package ) _archiver_darwin=$($(package ) _ar)
3636
37- boost_toolset_darwin=$($(package ) _toolset_darwin)
38- boost_archiver_darwin=$($(package ) _archiver_darwin)
39-
40- # real library list
37+ # Libraries to build
4138$(package ) _config_libraries=chrono,filesystem,program_options,system,thread
4239
4340$(package ) _cxxflags=-std=c++11 -fvisibility=hidden
4441$(package ) _cxxflags_linux=-fPIC
4542
46- # sysroot is passed by toolchain, NOT duplicated here
43+ # linker flags only (sysroot handled by toolchain or preprocess)
4744$(package ) _ldflags+= -Wl,-syslibroot,$(OSX_SDK_PATH )
4845endef
4946
5047# ==================================================================
51- # PREPROCESS
48+ # PREPROCESS — CREATE user-config.jam
5249# ==================================================================
5350
5451ifeq ($(host_os ) ,darwin)
5552
5653define $(package)_preprocess_cmds
57- echo "using clang : : clang++ -target x86_64-apple-darwin11 --sysroot=$(OSX_SDK_PATH ) -stdlib=libc++ -mmacosx-version-min=10.8 \
58- : <cxxflags>\"$($(package ) _cxxflags) -stdlib=libc++ -isystem$(OSX_SDK_PATH ) /usr/include/c++/v1\" \
59- <linkflags>\"$($(package ) _ldflags) -stdlib=libc++\" \
60- <archiver>\"$(host_AR ) \" \
61- <ranlib>\"$(host_RANLIB ) \" \
62- <striper>\"$(host_STRIP ) \" \
63- ;" > user-config.jam
54+ echo "using clang-darwin : : clang++ -target x86_64-apple-darwin11 \
55+ --sysroot=$(OSX_SDK_PATH ) \
56+ -mmacosx-version-min=10.8 \
57+ -stdlib=libc++ \
58+ : <cxxflags>\"-nostdinc++ -std=c++11 \
59+ -isystem$(OSX_SDK_PATH ) /usr/include/c++/v1\" \
60+ <linkflags>\"-stdlib=libc++ -Wl,-syslibroot,$(OSX_SDK_PATH ) \" \
61+ <archiver>\"$(host_AR ) \" \
62+ <ranlib>\"$(host_RANLIB ) \" \
63+ <striper>\"$(host_STRIP ) \" \
64+ ;" > user-config.jam
6465endef
6566
6667else
6768
6869define $(package)_preprocess_cmds
6970 echo "using gcc : : $($(package ) _cxx) \
70- : <cxxflags>\"$($(package ) _cxxflags) \" \
71- <linkflags>\"$($(package ) _ldflags) \" \
72- <archiver>\"$($(package ) _ar) \" \
73- <ranlib>\"$(host_RANLIB ) \" \
74- <striper>\"$(host_STRIP ) \" \
75- ;" > user-config.jam
71+ : <cxxflags>\"$($(package ) _cxxflags) \" \
72+ <linkflags>\"$($(package ) _ldflags) \" \
73+ <archiver>\"$($(package ) _ar) \" \
74+ <ranlib>\"$(host_RANLIB ) \" \
75+ <striper>\"$(host_STRIP ) \" \
76+ ;" > user-config.jam
7677endef
7778
7879endif
7980
8081# ==================================================================
81- # CONFIG — BUILD B2 ENGINE WITH HOST COMPILER
82+ # CONFIG — BUILD B2 ENGINE
8283# ==================================================================
8384
8485ifeq ($(host_os ) ,darwin)
8586
8687define $(package)_config_cmds
8788 PATH="$(BOOST_NO_WRAP_PATH ) " CC="$(CC_FOR_BUILD ) " CXX="$(CXX_FOR_BUILD ) " \
8889 ./bootstrap.sh --without-icu \
89- --with-toolset=gcc \
90+ --with-toolset=clang-darwin \
9091 --with-libraries=$($(package ) _config_libraries) \
9192 || ( echo "=== BOOST BOOTSTRAP.LOG ===" \
9293 && cat bootstrap.log \
@@ -108,9 +109,11 @@ endif
108109# ==================================================================
109110
110111define $(package)_build_cmds
111- ./b2 -d2 -j2 -d1 --prefix=$($(package ) _staging_prefix_dir) $($(package ) _config_opts) stage
112+ ./b2 -d2 -j2 -d1 --prefix=$($(package ) _staging_prefix_dir) \
113+ $($(package ) _config_opts) stage
112114endef
113115
114116define $(package)_stage_cmds
115- ./b2 -d0 -j4 --prefix=$($(package ) _staging_prefix_dir) $($(package ) _config_opts) install
117+ ./b2 -d0 -j4 --prefix=$($(package ) _staging_prefix_dir) \
118+ $($(package ) _config_opts) install
116119endef
0 commit comments