aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-01-30 14:31:43 +0000
committerfanquake <fanquake@gmail.com>2023-01-30 14:32:32 +0000
commit228edafc663403990e8fa7b9768bf7254358b59e (patch)
tree7cc477d694ac2b3682aa3555cfac5226bdb4544c /depends/hosts
parent79e18ebc81f112f989ff50fb6f5a6a17db9b6758 (diff)
parenta3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 (diff)
Merge bitcoin/bitcoin#23619: build: Propagate user-defined flags to host packages
a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 ci: Drop no longer needed package-specific flags (Hennadii Stepanov) 071eef1e974f128131afe6c6b5c68a430c64687a build: Propagate user-defined flags to host packages (Hennadii Stepanov) Pull request description: On master (4f8b1f8759301d2553183e14f72444a0f1d80725) `{CPP,C,CXX,LD}FLAGS` that are specified in the command line are not propagated to packages: ``` $ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag libevent_cxxflags=-pipe -O2 ``` This PR: - propagates `{CPP,C,CXX,LD}FLAGS` to host packages: ``` $ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag libevent_cxxflags= -some-fancy-flag ``` - does not propagate `{CPP,C,CXX,LD}FLAGS` to native packages: ``` $ make --no-print-directory -C depends print-native_b2_cxxflags CXXFLAGS=-some-fancy-flag native_b2_cxxflags= ``` - actually addresses the https://github.com/bitcoin/bitcoin/pull/23551#issuecomment-973896518 ACKs for top commit: TheCharlatan: Code review ACK a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 Tree-SHA512: 243d6b1b0e9c5de46debc36de62a77b6b4d6f638940fd530040c219956ec624e321b0c25290fed164e3a8c88befa7b97b20f765d7b9a428c269b3720f21da099
Diffstat (limited to 'depends/hosts')
-rw-r--r--depends/hosts/default.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk
index 7c76331ab4..bad4568bcb 100644
--- a/depends/hosts/default.mk
+++ b/depends/hosts/default.mk
@@ -28,8 +28,13 @@ host_$1=$$($(host_arch)_$(host_os)_$1)
endef
define add_host_flags_func
+ifeq ($(filter $(origin $1),undefined default),)
+$(host_arch)_$(host_os)_$1 =
+$(host_arch)_$(host_os)_$(release_type)_$1 = $($1)
+else
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
+endif
host_$1 = $$($(host_arch)_$(host_os)_$1)
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
endef