3 ms·
Cross-compilation with Rust is fairly trivial; it's just a matter of "rustup target add some-host-triple". GCC's cross-compilation story is indeed a nightmare.
by kelnos 5y ago
Cross-compilation with Rust is fairly trivial; it's just a matter of "rustup target add some-host-triple".
GCC's cross-compilation story is indeed a nightmare. I expect if you have to use the GCC Rust backend (after it's ready) for arches rustc/LLVM don't support, you'll have that pain, but I expect it will just be a matter of adding an "--enable-language rust" to the GCC configure script run, similar to adding C++, ObjC, etc. to a GCC build. So the cross-compiler build will take longer, but won't involve extra steps or infrastructure.
- megous 5y agoBinutils/gcc cross-compiler can be built rather quickly, once you know the right configure flags for each. Then it's just make && make install. You can speed the buil considerably by building with -g0 and not doing a bootrstrap or building needless targets. Then you have a cross-compiler in some --prefix that you can point the kernel build system to via some environment variables and you're done. It's a well known process. It's basically built just like any other dependency and doesn't take much time. Hardly a nightmare. If it would be possible to just add rust to the list of gcc languages, that would indeed be very easy.