On master (66636ca438cb65fb18bcaa4540856cef0cee2029) build tools for native packages are set to defaults, even when such a tool is not available in the system by its default name:
0$ cd depends
1$ make print-native_capnp_cxx MULTIPROCESS=1 CC=clang CXX=clang++
2native_capnp_cxx=g++
On system without GCC installed, this causes an error:
0$ make native_capnp_configured MULTIPROCESS=1 CC=clang CXX=clang++
1Configuring native_capnp...
2...
3configure: error: *** A compiler with support for C++14 language features is required.
4make: *** [funcs.mk:283: /home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/native_capnp/0.7.0-4f60a88ce07/./.stamp_configured] Error 1
This PR fixes this issue with introducing support of {CC,CXX}_FOR_BUILD
variables.
With this PR:
0$ make print-native_capnp_cxx MULTIPROCESS=1 CC_FOR_BUILD=clang CXX_FOR_BUILD=clang++
1native_capnp_cxx=clang++
2$ make native_capnp_configured MULTIPROCESS=1 CC_FOR_BUILD=clang CXX_FOR_BUILD=clang++
3# no errors