[clang] [llvm] [PowerPC] Take ABI into account for data layout (PR #149725)

Jens Reidel via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 22 10:21:39 PDT 2025


Gelbpunkt wrote:

> Is the purpose of this PR to enable codegen on BE distros that use Elf V2

No. That is already possible, but it is purely dependent on the target triple. Targets such as FreeBSD or Linux with musl already use the ELFv2 ABI for BE ppc64.

All that this PR does is fix the data layout when specifying `-mabi=elfv2` for a target that currently uses ELFv1 by default, such as `powerpc64-unknown-linux-gnu`. I consider this purely a bugfix, because the `-mabi` flag previously had no effect on data layout. Codegen for BE ELFv2 is already implemented and works just fine.

https://github.com/llvm/llvm-project/pull/149725


More information about the cfe-commits mailing list