Skip to content

test(ppc64): enable ppc64le in the test harness and CI#2003

Merged
davidlattimore merged 8 commits into
wild-linker:mainfrom
runlevel5:ppc64-test-infra-ci
May 31, 2026
Merged

test(ppc64): enable ppc64le in the test harness and CI#2003
davidlattimore merged 8 commits into
wild-linker:mainfrom
runlevel5:ppc64-test-infra-ci

Conversation

@runlevel5
Copy link
Copy Markdown
Contributor

This PR wires ppc64le into the integration-test harness, linker-diff, and CI so the port is actually covered, and installs the cross toolchain so it runs in GitHub Actions under qemu.

@lapla-cogito
Copy link
Copy Markdown
Member

Please create a new section for ppc64 in tests/external_tests/mold_skip_tests.toml and put arch-ppc64le-save-restore-gprs.sh into it to make the external tests CI pass.

runlevel5 added 8 commits June 1, 2026 02:46
Add the Ppc64 architecture to the test harness: powerpc64le target
triple, -m elf64lppc emulation, the ld64.so.2 dynamic linker, the
cross-toolchain prefix and native-host detection. linker-diff support is
still required before the tests can actually run.
Add ArchKind::Ppc64 and a linker-diff ppc64 module (objdump-based
instruction decoding via -m powerpc:common64; no relaxations or PLT
decoding yet), wired into the diff dispatch, objdump selection and
EM_PPC64 detection, plus DynamicRelocationKind::from_ppc64_r_type.

Also pass --endian=little to objdump unconditionally: every target we
support is little-endian, but the generic powerpc:common64 machine
defaults to big-endian and would otherwise disassemble garbage.
The perf module is only available on linux x86_64/aarch64; other linux
targets alias perf_unsupported as perf. powerpc64 was missing from that
list, so libwild failed to build natively on ppc64le.
The no-libc test runtime needs two per-arch bits on ppc64le: an
exit_syscall stub, and a memcpy (ppc64le gcc lowers large aggregate
initialisers to a memcpy call where the other targets inline it).
@runlevel5 runlevel5 force-pushed the ppc64-test-infra-ci branch from 36a9660 to 21b7b4e Compare May 31, 2026 16:47
@davidlattimore davidlattimore merged commit 63b4692 into wild-linker:main May 31, 2026
24 checks passed
@runlevel5 runlevel5 deleted the ppc64-test-infra-ci branch May 31, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants