I'm trying to run Rust on an ARMv7l server, which is provided by Scaleway (their C1 baremetal ARM server with 4 cores.)
However, when I try to run any of the Rust executables, the process gets killed with SIGILL (illegal instruction.)
I suspect that this is because all the binaries available for Rust on armv7 (rustup-init, rust nightly, stable, etc.) are compiled with NEON support, but the CPU on the server does not feature NEON support.
root@cloudsearcher:~# file rustup-init
rustup-init: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.72, not stripped
Program received signal SIGILL, Illegal instruction.
0x7f887360 in std::rt::lang_start::h73c48c6a9af036ed ()
(gdb) x/8i 0x7f887360
=> 0x7f887360 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+68>: vmov.i32 q8, #0 ; 0x00000000
0x7f887364 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+72>: movw r11, #7453 ; 0x1d1d
0x7f887368 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+76>: mov r1, r0
0x7f88736c <_ZN3std2rt10lang_start17h73c48c6a9af036edE+80>: movt r11, #7453 ; 0x1d1d
0x7f887370 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+84>: mov r6, #0
0x7f887374 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+88>:
ldr r4, [pc, #2864] ; 0x7f887eac <_ZN3std2rt10lang_start17h73c48c6a9af036edE+2960>
0x7f887378 <_ZN3std2rt10lang_start17h73c48c6a9af036edE+92>: vst1.64 {d16-d17}, [r1]!
0x7f88737c <_ZN3std2rt10lang_start17h73c48c6a9af036edE+96>: vst1.64 {d16-d17}, [r1]
root@cloudsearcher:~# cat /proc/cpuinfo | grep Features
Features : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfpd32 lpae
Features : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfpd32 lpae
Features : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfpd32 lpae
Features : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfpd32 lpae
so I'd like to ask - what's the easiest way of cross-compiling Rust without NEON support for the armv7l arch? And how would I go about compiling my projects without NEON?
Thanks in advance!