about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-11-17 15:12:15 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-11-17 15:12:15 +0530
commit3d1f3c9d389d46607ae28c51cc94c1f43d65f3f9 (patch)
tree31e17ac953d63a6c3529ffb90848d67f8009d426
parentbf565467c09916e3b4e0abc16827cbf0db931dba (diff)
parent19bd051c86f04952d107a780e25b64c38b3388b6 (diff)
downloadrust-3d1f3c9d389d46607ae28c51cc94c1f43d65f3f9.tar.gz
rust-3d1f3c9d389d46607ae28c51cc94c1f43d65f3f9.zip
Rollup merge of #29876 - cardoe:i586-build-fix, r=alexcrichton
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 <cardoe@cardoe.com>
-rw-r--r--mk/platform.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/mk/platform.mk b/mk/platform.mk
index 9d27f6b2a67..e6669f5c58d 100644
--- a/mk/platform.mk
+++ b/mk/platform.mk
@@ -14,7 +14,7 @@
 # would create a variable HOST_i686-darwin-macos with the value
 # i386.
 define DEF_HOST_VAR
-  HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
+  HOST_$(1) = $(patsubst i%86,i386,$(word 1,$(subst -, ,$(1))))
 endef
 $(foreach t,$(CFG_TARGET),$(eval $(call DEF_HOST_VAR,$(t))))
 $(foreach t,$(CFG_TARGET),$(info cfg: host for $(t) is $(HOST_$(t))))