Skip to content

Commit 74131da

Browse files
theuniFabcien
authored andcommitted
depends: fix boost mac cross build with clang 9+
Summary: ``` The ancient "darwin-4.9.1" profile has long been used to match against clang, which prior to version 9, reported 4.9.1 as its version when invoking "clang++ -dumpversion". Presumably this was a historical compatibility quirk related to Apple's switch from gcc to clang. This was "fixed" in clang 9.0, so that -dumpversion reports the real version. Unfortunately that had the side-effect of breaking the (brittle) boost compiler detection. Move to the seemingly more-correct "clang-darwin" profile, which passes the checks and builds correctly. Also switch to using ar rather than libtool for archiving, as it's what the clang-darwin profile expects to be using. Note that because this is using a different profile, some of the final command-line arguments end up changing. The changes look sane at a glance. ``` Backport of core [[bitcoin/bitcoin#17231 | PR17231]]. Test Plan: Run the OSX Gitian build. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5672
1 parent 1e2d2d1 commit 74131da

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

depends/packages/boost.mk

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ $(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
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
13-
$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
13+
$(package)_config_opts_darwin=--toolset=clang-darwin runtime-link=shared
1414
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
1515
$(package)_config_opts_x86_64_mingw32=address-model=64
1616
$(package)_config_opts_i686_mingw32=address-model=32
1717
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
1818
$(package)_toolset_$(host_os)=gcc
1919
$(package)_archiver_$(host_os)=$($(package)_ar)
20-
$(package)_toolset_darwin=darwin
21-
$(package)_archiver_darwin=$($(package)_libtool)
20+
$(package)_toolset_darwin=clang-darwin
2221
$(package)_config_libraries=atomic,date_time,chrono,filesystem,system,thread,test
2322
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
2423
$(package)_cxxflags_linux=-fPIC

0 commit comments

Comments
 (0)