Skip to content

Commit 2872533

Browse files
committed
build: Use _FOR_BUILD suffix for tools to build native packages
1 parent 2f6e78a commit 2872533

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

depends/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ The following can be set when running make: `make FOO=bar`
111111
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
112112
- `FORCE_USE_SYSTEM_CLANG`: (EXPERTS ONLY) When cross-compiling for macOS, use Clang found in the
113113
system's `$PATH` rather than the default prebuilt release of Clang
114-
from llvm.org. Clang 8 or later is required.
114+
from llvm.org. Clang 8 or later is required
115+
- `{CC,CXX,...}_FOR_BUILD`: Build native packages with specified tools when
116+
a package build script allows it
115117

116118
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
117119
options will be passed to bitcoin's configure. In this case, `--disable-wallet`.

depends/builders/default.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ default_build_OTOOL = otool
88
default_build_INSTALL_NAME_TOOL = install_name_tool
99

1010
define add_build_tool_func
11-
ifeq ($(filter $(origin $1),undefined default),)
12-
build_$(build_os)_$1 = $(or $($1),$(build_$(build_os)_$1),$(default_build_$1))
13-
build_$(build_arch)_$(build_os)_$1 = $(or $($1),$(build_$(build_arch)_$(build_os)_$1),$$(build_$(build_os)_$1))
11+
ifneq ($(origin $(1)_FOR_BUILD),undefined)
12+
build_$(build_os)_$1 = $(or $($(1)_FOR_BUILD),$(build_$(build_os)_$1),$(default_build_$1))
13+
build_$(build_arch)_$(build_os)_$1 = $(or $($(1)_FOR_BUILD),$(build_$(build_arch)_$(build_os)_$1),$$(build_$(build_os)_$1))
1414
else
1515
build_$(build_os)_$1 ?= $$(default_build_$1)
1616
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)

0 commit comments

Comments
 (0)