Hacker News new | ask | show | jobs
by brettdong 1566 days ago
I tried cross-compiling a Rust project from ARM macOS host to ARM Linux target, compiling source files is still fine, but during linking stage it threw lots of lots of errors. And it’s a pure Rust project without any system library dependencies. Seems that the system linker also needs to support the target platform, or cross compiling won’t work.
1 comments

Rust has the option of using a different linker for each target platform.

But of course, your linker must support it. I don't know where to get a linker for Linux ARM in macOS. On Debian it's apt install.