Skip to content

Commit a62c544

Browse files
test 2
1 parent fced12b commit a62c544

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

depends/packages/boost.mk

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ $(package)_config_opts_debug=variant=debug
1010
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
1111
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
1212

13+
# ====== per-platform extra options ======
1314
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
1415

15-
# macOS: tell b2 to use clang toolset (flags come from user-config.jam)
16-
$(package)_config_opts_darwin=toolset=clang runtime-link=shared
16+
# macOS: use the 'darwin' toolset, runtime shared
17+
$(package)_config_opts_darwin=toolset=darwin runtime-link=shared
1718

1819
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
19-
2020
$(package)_config_opts_x86_64_mingw32=address-model=64
2121
$(package)_config_opts_i686_mingw32=address-model=32
2222
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
2323

2424
$(package)_toolset_$(host_os)=gcc
2525
$(package)_archiver_$(host_os)=$($(package)_ar)
2626

27-
# darwin toolset override (for other uses)
28-
$(package)_toolset_darwin=clang
27+
# darwin “preferred” toolset name
28+
$(package)_toolset_darwin=darwin
2929
$(package)_archiver_darwin=$($(package)_ar)
3030

3131
boost_toolset_darwin=$($(package)_toolset_darwin)
@@ -36,7 +36,7 @@ $(package)_config_libraries=chrono,filesystem,program_options,system,thread
3636
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
3737
$(package)_cxxflags_linux=-fPIC
3838

39-
# BOOST “FIX” FOR MISSING STANDARD HEADERS (used mainly on macOS)
39+
# macOS cross needs explicit sysroot and linker syslibroot
4040
$(package)_cppflags+= --sysroot=$(OSX_SDK_PATH)
4141
$(package)_cflags+= --sysroot=$(OSX_SDK_PATH)
4242
$(package)_ldflags+= -Wl,-syslibroot,$(OSX_SDK_PATH)
@@ -46,13 +46,14 @@ endef
4646
# PREPROCESS — Generate user-config.jam
4747
# ==================================================================
4848

49+
# On macOS we use the 'darwin' toolset and the cross CXX from depends
4950
ifeq ($(host_os),darwin)
5051

5152
define $(package)_preprocess_cmds
52-
echo "using clang : : $($(package)_cxx) \
53+
echo "using darwin : : $(host_CXX) \
5354
: <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags) -stdlib=libc++ -isystem$(OSX_SDK_PATH)/usr/include/c++/v1\" \
5455
<linkflags>\"$($(package)_ldflags) -stdlib=libc++\" \
55-
<archiver>\"$($(package)_ar)\" \
56+
<archiver>\"$(host_AR)\" \
5657
<ranlib>\"$(host_RANLIB)\" \
5758
<striper>\"$(host_STRIP)\" \
5859
;" > user-config.jam
@@ -73,22 +74,16 @@ endef
7374
endif
7475

7576
# ==================================================================
76-
# CONFIG — Patch: Force --with-toolset=clang on macOS
77+
# CONFIG — IMPORTANT: no --with-toolset on macOS
7778
# ==================================================================
7879

79-
ifeq ($(host_os),darwin)
80-
81-
define $(package)_config_cmds
82-
./bootstrap.sh --with-toolset=clang --without-icu --with-libraries=$(boost_config_libraries)
83-
endef
84-
85-
else
86-
8780
define $(package)_config_cmds
8881
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
8982
endef
9083

91-
endif
84+
# ==================================================================
85+
# BUILD + INSTALL
86+
# ==================================================================
9287

9388
define $(package)_build_cmds
9489
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage

0 commit comments

Comments
 (0)