Cross compile single c code file:


Get needed binaries: # sudo apt install gcc-i686-linux-gnu gcc-powerpc-linux-gnu gcc-powerpc64-linux-gnu gcc-aarch64-linux-gnu gcc-powerpc64le-linux-gnu gcc-riscv64-linux-gnu gcc-sparc64-linux-gnu

Or find needed binary through apt: # sudo apt search gcc linux-gnu


Compile x86 32bit P6 (Pentium Pro/II) or higher: # i686-linux-gnu-gcc mysoftware.c -o mysoftware

compile powerpc G3 (any) or higher:# powerpc-linux-gnu-gcc -mcpu=740 mysoftware.c -o mysoftware

compile powerpc64 (any BE) or higher: # powerpc64-linux-gnu-gcc mysoftware.c -o mysoftware

Check binary specs (such as right ISA): # readelf -h mysoftware


Sources:

Date: March 19th 2026



Back

© 2019 to 2026 Branden Gilfoil & © up to 2026 for respective owners.