There are several primary steps:
- build toolchain with crosstool-ng
- compile libunwind and add to toolchain
- compile std with the new toolchain
- link rust-cross toolchain with rustup
- build rust binaries :)
Some helpful links:
- crosstool-ng
- rustup
- rust-cross
- rust-lang PR for arm/musl targets
- rustbuild bot scripts for cross compiling
The following environment variables must not be set when building libunwind
but are required to build musl
:
export CXXFLAGS=-Wa,-mrelax-relocations=no
export CFLAGS=-fPIC -Wa,-mrelax-relocations=no