This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] FreeBSD >= 13 default ABI is ELFv2
AbandonedPublic

Authored by adalava on Jan 6 2020, 3:10 PM.

Details

Reviewers
dim
MaskRay
Summary

FreeBSD for PowerPC* transitioned[1][2] from gcc4.2 to LLVM9 on Dec 26, 2019 (starting from r356111). The PowerPC64 target also transitioned to ELFv2 ABI at same time, so this makes it default for FreeBSD releases >= 13

*Also would like to have this back ported to LLVM 9 on upstream if possible

[1] https://wiki.freebsd.org/powerpc/llvm-elfv2
[2] https://lists.freebsd.org/pipermail/freebsd-ppc/2019-December/011042.html

Event Timeline

adalava created this revision.Jan 6 2020, 3:10 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 6 2020, 3:10 PM

Are you still using -target powerpc64-unknown-freebsd12.0-elfv2 or -target powerpc64-unknown-freebsd12.0-elfv1 added in https://reviews.llvm.org/rL361355 ?

MaskRay added inline comments.Jan 6 2020, 4:50 PM
clang/lib/Basic/Targets/PPC.h
389

Which ABI does powerpc64le-linux-gnu use after this change?

adalava marked an inline comment as done.Jan 7 2020, 5:18 AM

Are you still using -target powerpc64-unknown-freebsd12.0-elfv2 or -target powerpc64-unknown-freebsd12.0-elfv1 added in https://reviews.llvm.org/rL361355 ?

No, we are not using this triplet anymore after decision to OS version to change ABI, nobody is relying on it.
Are you willing to remove it? User can add "-mabi=[elfv1|elfv2]" to override the default ABI for that OS version, anyway.

clang/lib/Basic/Targets/PPC.h
389

It should be using ELFv2:

[alfredo.junior@FreeBSD_x86 ~/src/llvm-project/build-release-master]$ ./bin/clang -target powerpc64le-linux-gnu -dM -E - < /dev/null | grep CALL_ELF
#define _CALL_ELF 2

Is it ok?

Obsoleted by D72352 ?

adalava abandoned this revision.Jan 7 2020, 1:00 PM

Obsoleted by D72352 ?

Sure, abandoning in favor of D72352. Thank you!