Skip to content

build: Propagate user-defined tools to native packages

On master (66636ca4) build tools for native packages are set to defaults, even when such a tool is not available in the system by its default name:

$ cd depends
$ make print-native_capnp_cxx MULTIPROCESS=1 CC=clang CXX=clang++
native_capnp_cxx=g++

On system without GCC installed, this causes an error:

$ make native_capnp_configured MULTIPROCESS=1 CC=clang CXX=clang++
Configuring native_capnp...
...
configure: error: *** A compiler with support for C++14 language features is required.
make: *** [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:

$ make print-native_capnp_cxx MULTIPROCESS=1 CC_FOR_BUILD=clang CXX_FOR_BUILD=clang++
native_capnp_cxx=clang++
$ make native_capnp_configured MULTIPROCESS=1 CC_FOR_BUILD=clang CXX_FOR_BUILD=clang++
# no errors

Merge request reports

Loading