Skip to content

Commit 19bd051

Browse files
committed
mk/platform: support i486 and i586 target CHOST
On distros that use i486 or i586 in their CHOST, Rust will fail to build because it is not handling i486 or i586 like i686 is handled. This changes the match to do work for all instances of i?86 instead of just i686. The Yocto Project still uses i586 as a target. Signed-off-by: Doug Goldstein <[email protected]>
1 parent 3042fed commit 19bd051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# would create a variable HOST_i686-darwin-macos with the value
1515
# i386.
1616
define DEF_HOST_VAR
17-
HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
17+
HOST_$(1) = $(patsubst i%86,i386,$(word 1,$(subst -, ,$(1))))
1818
endef
1919
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_HOST_VAR,$(t))))
2020
$(foreach t,$(CFG_TARGET),$(info cfg: host for $(t) is $(HOST_$(t))))

0 commit comments

Comments
 (0)