build: Add objcopy host tool

Qt's mkspec references the objcopy tool.
This commit is contained in:
Hennadii Stepanov 2022-08-13 13:30:55 +01:00
parent a2e733b946
commit d61f6677e3
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -9,6 +9,7 @@ default_host_RANLIB = $(host_toolchain)ranlib
default_host_STRIP = $(host_toolchain)strip
default_host_LIBTOOL = $(host_toolchain)libtool
default_host_NM = $(host_toolchain)nm
default_host_OBJCOPY = $(host_toolchain)objcopy
define add_host_tool_func
ifneq ($(filter $(origin $1),undefined default),)
@ -33,5 +34,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1)
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
endef
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
$(foreach tool,CC CXX AR RANLIB STRIP LIBTOOL NM OBJCOPY OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))