Systems Programming · Cluster
Cross Compilation
Targets, sysroots, and emulation.
- 01 Reading a Target Triple as an ABI Contract What each field of a target triple selects, how GCC and Clang disagree about defaults, and why two triples naming the same CPU can produce objects that refuse to link.
- 02 Build, Host, and Target: Three Machines in One Toolchain Why a cross build needs three machine names rather than two, which of them selects the compiler, and how a compiler that runs somewhere other than where it was built gets produced.
- 03 What a Sysroot Actually Restricts in a Cross Build A sysroot rewrites some search paths and leaves others untouched. The layout it expects, the linker scripts that depend on it, and the routes by which host headers still reach the compiler.
- 04 Why a Cross Toolchain Bootstraps in a Fixed Order The compiler needs a C library to link, and the C library needs a compiler to build. How a three-stage bootstrap breaks that cycle and which artefacts appear at each stage.
- 05 User-Mode Emulation and binfmt_misc for Foreign Binaries How a binary for another architecture starts on a host kernel at all, which parts of its execution the emulator rewrites, and the behaviours that stop being faithful once it does.
- 06 Floating-Point ABI Variants and the Linker Errors They Cause Soft, softfp, and hard float on 32-bit ARM decide where arguments travel rather than what arithmetic runs, and only the static linker notices when a build mixes them.
- 07 Configure Tests That Execute Cannot Survive a Cross Build Run-time feature checks answer questions about whichever machine runs them, and caching makes the wrong answers outlive the build. Which tests can be converted, and which must be replaced by a declaration.
- 08 Symbol Versioning and the Minimum glibc a Binary Requires Versioned symbols record the library release that first defined each function a binary calls. How that floor is written into the file, why it cannot be lowered after linking, and how to check it before shipping.
- 09 Remote Debugging Through gdbserver and a Target Sysroot The debugger runs on one machine and the process on another, with only a byte stream between them. Which memory reads the host performs, why the target libraries must exist locally, and what breaks once addresses stop matching.
- 10 Cross-Compiling Out-of-Tree Kernel Modules A module is linked against a kernel build tree rather than a C library, which changes which compiler builds the tools, what a version magic string enforces, and why a matching configuration matters more than a matching triple.