Skip to content

Commit c129fa3

Browse files
committed
Do not fallback to "arm" in rustup-init.sh on aarch64 with 32-bit userland
On aarch64, neon will not be present in /proc/cpuinfo, instead asimd is there. Previously, we'd fall back to arm when running with a 32-bit userland, even though armv7 is perfectly appropriate in this case. This would then run into the issue described in rust-lang/rust#58414 with "CP15 barrier emulation". This PR fixes that.
1 parent d4c6844 commit c129fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rustup-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ get_architecture() {
517517
# and fall back to arm.
518518
# See https://github.com/rust-lang/rustup.rs/issues/587.
519519
if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then
520-
if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then
521-
# At least one processor does not have NEON.
520+
if ensure grep '^Features' /proc/cpuinfo | grep -E -q -v 'neon|simd'; then
521+
# At least one processor does not have NEON (which is asimd on armv8+).
522522
_cputype=arm
523523
fi
524524
fi

0 commit comments

Comments
 (0)