This PR improves the robustness of our boost package in depends, most notably:
- Bumps boost from
1.70.0
to1.71.0
, because1.71.0
:- Removes the need to patch out the unused variable.
https://github.com/bitcoin/bitcoin/blob/f8462a6d2794be728cf8550f45d19a354aae59cf/depends/packages/boost.mk#L36
Upstream boost patched it out in https://github.com/boostorg/process/commit/d20b64cf37a773e452b84ce619752e3785be756c, which was first included in the
1.71.0
release - Comes packaged with a version of
b2
which allows us to override itsCXX
andCXXFLAGS
. Previously, choosing a toolset while buildingb2
such asclang
orgcc
would forceb2
’s build system to invoke the compiler as a bare, hardcodedclang
orgcc
. However, ourdepends
build system often want to customize this behaviour, adding extra flags or invoking the compiler by an alternate name. So this is useful.- Commit where
CXX
was introduced: https://github.com/boostorg/build/commit/374f96516a6210687cdf63c987710501634bcac9 - Commit where
CXXFLAGS
was introduced: https://github.com/boostorg/build/commit/5d49abc1f291573d4bdcd2ee647b05a66f9c6497
- Commit where
- Removes the need to patch out the unused variable.
https://github.com/bitcoin/bitcoin/blob/f8462a6d2794be728cf8550f45d19a354aae59cf/depends/packages/boost.mk#L36
Upstream boost patched it out in https://github.com/boostorg/process/commit/d20b64cf37a773e452b84ce619752e3785be756c, which was first included in the
- The boost package is now split into
native_b2
andboost
, better representing what actually happens.- In our
depends
build system, we have a distinction betweennative
packages and non-native
packages. The output ofnative
packages are meant to be used on the machine that’s performing the build, and the output of non-native
packages are meant to be used on/for the machine that will ultimately be running bitcoin. Previously,boost
existed independs
as a non-native
package, but that’s partly inaccurate because the./bootstrap.sh
invocation in its$(package)_config_cmds
stage actually produced a binary calledb2
, which is run on the machine that’s performing the build. This means thatb2
is anative
package which is being built in an environment set up for the non-native
packageboost
. This reveals a hidden unintended behavior in ourdepends
build system: for linux->darwin cross builds, we usegcc
fornative
packages, andclang
for non-native
packages. Butb2
was actually being built usingclang
, since it was being built in an environment set up for non-native
packages.
- In our
theuni you might be interested in taking a look