Skip to content

Commit e6e5c8d

Browse files
committed
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.
1 parent abdfd2d commit e6e5c8d

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

depends/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,12 @@ all_packages = $(packages) $(native_packages)
150150

151151
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
152152

153+
$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils)
153154
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
154155

155156
include funcs.mk
156157

158+
binutils_path=$($($(host_arch)_$(host_os)_native_binutils)_prefixbin)
157159
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
158160
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
159161
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_
170172
$(AT)sed -e 's|@HOST@|$(host)|' \
171173
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
172174
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
173-
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
174-
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
175-
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
176-
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
175+
-e 's|@AR@|$(binutils_path)$(host_AR)|' \
176+
-e 's|@RANLIB@|$(binutils_path)$(host_RANLIB)|' \
177+
-e 's|@NM@|$(binutils_path)$(host_NM)|' \
178+
-e 's|@STRIP@|$(binutils_path)$(host_STRIP)|' \
177179
-e 's|@build_os@|$(build_os)|' \
178180
-e 's|@host_os@|$(host_os)|' \
179181
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \

depends/builders/darwin.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool)
1919
darwin_OTOOL:=$(shell xcrun -f otool)
2020
darwin_NM:=$(shell xcrun -f nm)
2121
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
22+
darwin_native_binutils=
2223
darwin_native_toolchain=

depends/funcs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ endef
4141

4242
define int_get_build_id
4343
$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
44-
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
44+
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies)))
4545
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
4646
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
4747
$(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,$
260260
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
261261

262262
#special exception: if a toolchain package exists, all non-native packages depend on it
263-
$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
263+
$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))

depends/hosts/darwin.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
2020
darwin_debug_CFLAGS=-O1
2121
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
2222

23+
darwin_native_binutils=native_cctools
2324
darwin_native_toolchain=native_cctools
2425
darwin_cmake_system=Darwin

0 commit comments

Comments
 (0)