Cross-compiling rust for x86_64-unknown-linux-musl target problems


Hi there, I tried compiling rust for the target above and while that worked, but compiling a simple hello world program failed with
= note: /home/user/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-c0a6a180cc46432e.rlib(alloc-c0a6a180cc46432e.2dnjn04rkze68zbm.rcgu.o): In functionalloc::al
2dnjn04rkze68zbm:(.text._ZN5alloc5alloc18handle_alloc_error17h47bb1c69f57a0d07E+0x3): undefined reference to rust_oom' collect2: error: ld returned 1 exit status

From my (rudimentary) investigation it seems that rust_oom is defined in libstd but libstd is linked before liballoc so the symbol is removed at link time.

When installing the target to the current stable/nightly toolchain everything works so the problem is most likely with the way I compiled rustc.

Any help would be appreciated!