This PR improves the robustness of our boost package in depends, most notably:
- Bumps boost from
1.70.0to1.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.0release - Comes packaged with a version of
b2which allows us to override itsCXXandCXXFLAGS. Previously, choosing a toolset while buildingb2such asclangorgccwould forceb2’s build system to invoke the compiler as a bare, hardcodedclangorgcc. However, ourdependsbuild system often want to customize this behaviour, adding extra flags or invoking the compiler by an alternate name. So this is useful.- Commit where
CXXwas introduced: https://github.com/boostorg/build/commit/374f96516a6210687cdf63c987710501634bcac9 - Commit where
CXXFLAGSwas 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_b2andboost, better representing what actually happens.- In our
dependsbuild system, we have a distinction betweennativepackages and non-nativepackages. The output ofnativepackages are meant to be used on the machine that’s performing the build, and the output of non-nativepackages are meant to be used on/for the machine that will ultimately be running bitcoin. Previously,boostexisted independsas a non-nativepackage, but that’s partly inaccurate because the./bootstrap.shinvocation in its$(package)_config_cmdsstage actually produced a binary calledb2, which is run on the machine that’s performing the build. This means thatb2is anativepackage which is being built in an environment set up for the non-nativepackageboost. This reveals a hidden unintended behavior in ourdependsbuild system: for linux->darwin cross builds, we usegccfornativepackages, andclangfor non-nativepackages. Butb2was actually being built usingclang, since it was being built in an environment set up for non-nativepackages.
- In our
theuni you might be interested in taking a look