aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2019-10-09 20:10:00 -0400
committerCarl Dong <contact@carldong.me>2020-07-07 16:25:47 -0400
commite6e5c8d6caccb4648fc580e5a01448857c2fdf18 (patch)
tree23b7f41c59b507f351278a30d89a7d7af0315168 /depends
parentabdfd2d0e3ebec7dbead89317ee9192189a35809 (diff)
downloadbitcoin-e6e5c8d6caccb4648fc580e5a01448857c2fdf18.tar.xz
depends: Decouple toolchain + binutils
For now they remain the same, but in the next commit, we will assign them differently according to wether or not we're using system clang.
Diffstat (limited to 'depends')
-rw-r--r--depends/Makefile10
-rw-r--r--depends/builders/darwin.mk1
-rw-r--r--depends/funcs.mk4
-rw-r--r--depends/hosts/darwin.mk1
4 files changed, 10 insertions, 6 deletions
diff --git a/depends/Makefile b/depends/Makefile
index 3d0784cb6b..463d10efa2 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -150,10 +150,12 @@ all_packages = $(packages) $(native_packages)
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
+$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils)
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
include funcs.mk
+binutils_path=$($($(host_arch)_$(host_os)_native_binutils)_prefixbin)
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
@@ -170,10 +172,10 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
- -e 's|@AR@|$(toolchain_path)$(host_AR)|' \
- -e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
- -e 's|@NM@|$(toolchain_path)$(host_NM)|' \
- -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
+ -e 's|@AR@|$(binutils_path)$(host_AR)|' \
+ -e 's|@RANLIB@|$(binutils_path)$(host_RANLIB)|' \
+ -e 's|@NM@|$(binutils_path)$(host_NM)|' \
+ -e 's|@STRIP@|$(binutils_path)$(host_STRIP)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
index 69c394ec1d..f4103fc1f2 100644
--- a/depends/builders/darwin.mk
+++ b/depends/builders/darwin.mk
@@ -19,4 +19,5 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool)
darwin_OTOOL:=$(shell xcrun -f otool)
darwin_NM:=$(shell xcrun -f nm)
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
+darwin_native_binutils=
darwin_native_toolchain=
diff --git a/depends/funcs.mk b/depends/funcs.mk
index 135ebba9f8..6fc20543bb 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -41,7 +41,7 @@ endef
define int_get_build_id
$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies)))
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
@@ -260,4 +260,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
#special exception: if a toolchain package exists, all non-native packages depend on it
-$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
+$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index 0d4fab937d..fcd4ef7607 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -20,5 +20,6 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
+darwin_native_binutils=native_cctools
darwin_native_toolchain=native_cctools
darwin_cmake_system=Darwin