Big-endian builds run on every 64-bit PowerPC, as x86-64 builds run on every x86-64 (cmake/cross.cmake): the
ppc64 CPU without AltiVec, which POWER4, POWER5 and the e5500 lack (Clang's default ppc64 is the 970's, with
it), and without the optional fsqrt, fres, frsqrte and stfiwx, which the e5500 and e6500 lack. Clang has no
-mno- flag for those, so they go to cc1 as -Xclang -target-feature -Xclang -fsqrt and so on. The code keeps
fsel, which Clang emits for every PowerPC (its e5500 too), and mfocrf, which a CPU before POWER4 runs as mfcr.
FFmpeg is built without AltiVec (cmake/ffmpeg.cmake), as its configure would compile every file with -maltivec;
OpenSSL picks its routines for later CPUs by the machine's capabilities.
The linux-ppc64-g5-cross preset is the ELFv2 build with this baseline, named for the PowerMac G5:
export SNX_SYSROOT=/path/to/arch-power-ppc64
cmake --preset linux-ppc64-g5-cross -DSNX_SYSTEM_SDL3=ON
cmake --build --preset linux-ppc64-g5-cross
The recompiler's back end runs on all of them too. Its code reads and writes the guest's doublewords with ldbrx
and stdbrx where the kernel's AT_HWCAP says the CPU has them (PPC_FEATURE_ARCH_2_06, POWER7 on, or
PPC_FEATURE_CELL), and as two words each (lwbrx, stwbrx) on the others: POWER4 to POWER6, the 970, PA6T, and NXP's
e5500 and e6500; neither is one access, where Arm's aligned doubleword is. Its calls are ELFv2's.
What changes before POWER8:
RtAPI.cas128, common/runtime/cas128.c), as on
RISC-V and LoongArch. It runs POWER8's lqarx/stqcx. where the kernel reports ISA 2.07, and takes a lock of the
address's stripe elsewhere, which keeps the 16 bytes atomic against other STXPs but not against plain stores.The PowerMac G5's own graphics cards have no Vulkan driver, so the 970 build needs a later card that Mesa drives.
Made from docs/hosts/ppc64.md at 69237645142c. GPL-3.0-or-later.