

The general process of building a cross-compiler looks like this:

Out of the target CPU architecture, the target OS, and the application binary


Want to compile C programs – just skip the Rust specific steps at the end. This means this guide applies also if you just While my goal is to be able to cross-compile Rust programs, this requiresĪ fully functional C toolchain. If you are using some other OS, you will hopefully be able to figure out the Preparation and installation of dependencies) will be specific to this system. Here,įurthermore, I am doing this on a MacBook under macOS. Not all guides establish clearly what use case they are intended for). Guides for one use-case will not necessarily work for the other use-case (and Building an application that runs on an already installed OS (such as Linux),īut on a different CPU architecture than your build host.Building a (Linux) kernel on one CPU architecture to use it on another.One main gotcha is that there are two major use cases for Slightly outdated, intended for slightly different use cases, and sometimes justĬonflicting. How all the pieces fit together as all the information on the web seems to be I recently set up a cross-compilation toolchain to compile applications on my Build and install glibc for the target system.Install glibc headers and bootstrap libraries.Building and installing a minimal gcc for static linking.Putting the Linux kernel headers into place.Verify signatures of downloaded software.
