Compilers
GCC 14.3
The main toolchain for glibc and musl. GCC 15 deprecated -mabi=ilp32 (still present in GCC 16
and 17 with a warning), so we stay on GCC 14 (14.3 for our toolchains, Debian's 14.2 for the Debian
packages). All our toolchains include a libgcc fix for unwinding through frames signed by clang's
pac-ret (C++ exceptions, backtraces). Toolchain scripts: test-ilp32.
clang 22
Upstream LLVM supports GNU ILP32 only in part: the clang front end was never finished, and the back end
passes pointers in a way that is not compatible with GCC. Our patches make clang compile
aarch64-linux-gnu_ilp32 and aarch64-linux-musl_ilp32, interoperable with GCC-built code,
and remove many needless pointer extensions. clang can also sign return addresses
(-mbranch-protection=pac-ret) for ILP32, which GCC cannot.
- Link with GNU ld; lld does not support ILP32.
- Use the GCC runtime libraries (libgcc, libstdc++).
- With ThinLTO, keep the default import limit:
-import-instr-limit=30saves only 1–2% memory and costs 1–1.3% speed.
Patches, build and measurements: github.com/ilp32-a64/llvm-ilp32.