mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 00:42:45 +00:00
doc: document depends compiler configuration
CC/CXX only override compilers for target (host) packages. Native build tool packages (native_capnp, native_qt, etc.) use separate build_CC/build_CXX variables, which default to gcc/g++ on Linux. On systems without gcc (e.g. Nix, Chimera Linux), native package builds fail unless build_CC/build_CXX are also set explicitly. Document how to override both sets of compilers.
This commit is contained in:
parent
b8c84ec5a6
commit
4c07cf87e2
@ -108,6 +108,18 @@ The following can be set when running make: `make FOO=bar`
|
||||
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
|
||||
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
|
||||
|
||||
## Compiler Configuration
|
||||
|
||||
`CC` and `CXX` control target compilers. `build_CC` and `build_CXX` control
|
||||
compilers for native build tools (e.g. `native_capnp`, `native_qt`), which
|
||||
default to `gcc`/`g++` on Linux and `clang`/`clang++` on macOS/FreeBSD/OpenBSD
|
||||
(see `./depends/builders/*.mk`).
|
||||
|
||||
On a system where the default build compiler is not available (e.g. Linux
|
||||
without gcc/g++), you could use the following to build all packages using clang:
|
||||
|
||||
make -C depends build_CC=clang build_CXX=clang++ CC=clang CXX=clang++
|
||||
|
||||
## Cross compilation
|
||||
|
||||
To build for another arch/OS:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user