The tools, once:
sudo apt install clang lld llvm ninja-build meson cmake ccache mmdebstrap qemu-user qemu-user-binfmt binfmt-support \
glslang-tools
A sysroot with the target's libraries, made without root by scripts/ppc64-sysroot.sh (about 1 GB). It is
staged in /var/tmp, as /tmp is often too small. The big-endian one is Arch POWER's (Big-endian hosts):
scripts/ppc64-sysroot.sh ppc64el .cache/sysroot-ppc64el
export SNX_SYSROOT=$PWD/.cache/sysroot-ppc64el
Then the build and the tests, which run under qemu-ppc64le:
cmake --preset linux-ppc64le-cross -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build --preset linux-ppc64le-cross
ctest --preset linux-ppc64le-cross -j"$(nproc)"
The presets point pkg-config at the sysroot and set QEMU_LD_PREFIX for the tests. One test is skipped under the emulator:
gui_process_tree reads a resident size that qemu reports as zero.
Made from docs/hosts/ppc64.md at 69237645142c. GPL-3.0-or-later.