Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request rust-lang#593 from sourcefrog/detect-arm
Browse files Browse the repository at this point in the history
Detect ARMv7 CPUs without NEON extensions and treat as ARMv6
  • Loading branch information
brson authored Jul 19, 2016
2 parents 579cb46 + 8a1d9bf commit bb7ffd4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bb7ffd4

Please sign in to comment.