Rust is automatically installed with https://rustup.rs
sh ./install_rust_armv6_target.sh
cd project_dir
cargo build --release --target=arm-unknown-linux-gnueabihf
readelf --arch-specific target/arm-unknown-linux-gnueabihf/release/my_project
The raspberrypi/tools repository is out of date. The recommendation to install gcc-arm-linux-gnueabihf
from the distributions apt repository would be fine for armv7.
For rpi0/1 the raspberrypi/tools repository mentions that it should be ./configure
d with --with-arch=armv6 --with-float=hard --with-fpu=vfp
.
There are several options available, already compiled, through sourceforge, however they appear to have been abandoned. https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/
and also see: https://github.com/abhiTronix/raspberry-pi-cross-compilers for furhter details for using gcc-6 to gcc-10 or compiling the tool chain manually.