From c228083a747b3b53dad5bdb245d9730f8940af7a Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 18 Jul 2016 09:50:23 -0700 Subject: [PATCH] Detect ARMv7 CPUs without NEON extensions and treat as ARMv6 --- rustup-init.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rustup-init.sh b/rustup-init.sh index 6f2ef17b78..e8b2d1ea8a 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -177,6 +177,16 @@ get_architecture() { fi fi + # Detect armv7 but without the CPU features Rust needs in that build, + # and fall back to arm. + # See https://github.com/rust-lang-nursery/rustup.rs/issues/587. + if [ $_ostype = "unknown-linux-gnueabihf" -a $_cputype = armv7 ]; then + if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then + # At least one processor does not have NEON. + local _cputype=arm + fi + fi + local _arch="$_cputype-$_ostype" RETVAL="$_arch"