File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,18 @@ default_host_OTOOL = $(host_toolchain)otool
13
13
default_host_NM = $(host_toolchain ) nm
14
14
15
15
define add_host_tool_func
16
+ ifneq ($(filter $(origin $1 ) ,undefined default) ,)
17
+ # Do not consider the well-known var $1 if it is undefined or is taking a value
18
+ # that is predefined by "make" (e.g. the make variable "CC" has a predefined
19
+ # value of "cc")
16
20
$(host_os)_$1? =$$(default_host_$1 )
17
21
$(host_arch)_$(host_os)_$1? =$$($(host_os ) _$1)
18
22
$(host_arch)_$(host_os)_$(release_type)_$1? =$$($(host_os ) _$1)
23
+ else
24
+ $(host_os)_$1 =$(or $($1 ) ,$($(host_os ) _$1) ,$(default_host_$1 ) )
25
+ $(host_arch)_$(host_os)_$1 =$(or $($1 ) ,$($(host_arch ) _$(host_os ) _$1) ,$$($(host_os ) _$1) )
26
+ $(host_arch)_$(host_os)_$(release_type)_$1 =$(or $($1 ) ,$($(host_arch ) _$(host_os ) _$(release_type ) _$1) ,$$($(host_os ) _$1) )
27
+ endif
19
28
host_$1=$$($(host_arch ) _$(host_os ) _$1)
20
29
endef
21
30
You can’t perform that action at this time.
0 commit comments