depends: Split boost into build/host packages + bump + cleanup
Summary:
This PR improves the robustness of our boost package in depends, most notably:
- Bumps boost from 1.70.0 to 1.71.0, because 1.71.0:
- Removes the need to patch out the unused variable.
- Comes packaged with a version of b2 which allows us to override its CXX and CXXFLAGS. Previously, choosing a toolset while building b2 such as clang or gcc would force b2's build system to invoke the compiler as a bare, hardcoded clang or gcc. However, our depends build system often want to customize this behaviour, adding extra flags or invoking the compiler by an alternate name. So this is useful.
- The boost package is now split into native_b2 and boost, better representing what actually happens.
- In our depends build system, we have a distinction between native packages and non-native packages. The output of native 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 in depends 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 called b2, which is run on the machine that's performing the build. This means that b2 is a native package which is being built in an environment set up for the non-native package boost. This reveals a hidden unintended behavior in our depends build system: for linux->darwin cross builds, we use gcc for native packages, and clang for non-native packages. But b2 was actually being built using clang, since it was being built in an environment set up for non-native packages.
This is a backport of core#19764 and core#21662
Test Plan: gitian builds
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13963