]> granicus.if.org Git - clang/commit
[PPC64] Parse -elfv1 -elfv2 when specified on target triple
authorFangrui Song <maskray@google.com>
Wed, 22 May 2019 07:29:59 +0000 (07:29 +0000)
committerFangrui Song <maskray@google.com>
Wed, 22 May 2019 07:29:59 +0000 (07:29 +0000)
commit75e09b32262072ee0e8b98bf4aa3a290e43e09d7
tree2d9d5d398714ca9976d8ec875e2fd1ce35a4e766
parentc5ca4afabdbc399bdc7155442c92f6928c68c022
[PPC64] Parse -elfv1 -elfv2 when specified on target triple

Summary:
For big-endian powerpc64, the default ABI is ELFv1. OpenPower ABI ELFv2 is supported when -mabi=elfv2 is specified. FreeBSD support for PowerPC64 ELFv2 ABI with LLVM is in progress[1]. This patch adds an alternative way to specify ELFv2 ABI on target triple [2].

The following results are expected:

ELFv1 when using:
-target powerpc64-unknown-freebsd12.0
-target powerpc64-unknown-freebsd12.0 -mabi=elfv1
-target powerpc64-unknown-freebsd12.0-elfv1

ELFv2 when using:
-target powerpc64-unknown-freebsd12.0 -mabi=elfv2
-target powerpc64-unknown-freebsd12.0-elfv2

[1] https://wiki.freebsd.org/powerpc/llvm-elfv2
[2] https://clang.llvm.org/docs/CrossCompilation.html

Patch by Alfredo Dal'Ava JĂșnior!

Differential Revision: https://reviews.llvm.org/D61950

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361355 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets/PPC.h