Cross-GCC Purpose Guide agents through setting up and using cross-compilation GCC toolchains: triplets, sysroots, pkg-config, QEMU-based testing, and common failure modes. Triggers - "How do I compile for ARM on my x86 machine?" - "I'm getting 'wrong ELF class' or 'cannot execute binary file'" - "How do I set up a sysroot for cross-compilation?" - "pkg-config returns host libraries in my cross build" - "How do I debug a cross-compiled binary with QEMU + GDB?" Workflow 1. Understand the triplet A GNU triplet has the form (often 3 or 4 parts): | Triplet | Target | |---------|--------| | | 64-bi…