Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140611337
D20383.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20383.diff
View Options
Index: head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
===================================================================
--- head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
+++ head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
@@ -375,12 +375,29 @@
IntMaxType = SignedLong;
Int64Type = SignedLong;
+ if (Triple.getEnvironment() != llvm::Triple::UnknownEnvironment) {
+ switch (Triple.getEnvironment()){
+ case llvm::Triple::ELFv1:
+ ABI = "elfv1";
+ break;
+ default:
+ ABI = "elfv2";
+ break;
+ }
+ } else {
+ if ((Triple.getOS() == llvm::Triple::FreeBSD) &&
+ (Triple.getOSMajorVersion() < 13)) {
+ ABI = "elfv1";
+ } else {
+ ABI = "elfv2";
+ }
+ }
+
+
if ((Triple.getArch() == llvm::Triple::ppc64le)) {
resetDataLayout("e-m:e-i64:64-n32:64");
- ABI = "elfv2";
} else {
resetDataLayout("E-m:e-i64:64-n32:64");
- ABI = Triple.getEnvironment() == llvm::Triple::ELFv2 ? "elfv2" : "elfv1";
}
if (Triple.getOS() == llvm::Triple::AIX)
Index: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
===================================================================
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -209,6 +209,20 @@
if (TT.isMacOSX())
return PPCTargetMachine::PPC_ABI_UNKNOWN;
+ if (TT.isOSFreeBSD()) {
+ switch (TT.getArch()) {
+ case Triple::ppc64le:
+ case Triple::ppc64:
+ if (TT.getOSMajorVersion() >= 13)
+ return PPCTargetMachine::PPC_ABI_ELFv2;
+ else
+ return PPCTargetMachine::PPC_ABI_ELFv1;
+ case Triple::ppc:
+ default:
+ return PPCTargetMachine::PPC_ABI_UNKNOWN;
+ }
+ }
+
switch (TT.getArch()) {
case Triple::ppc64le:
return PPCTargetMachine::PPC_ABI_ELFv2;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 26, 10:55 PM (8 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27291528
Default Alt Text
D20383.diff (1 KB)
Attached To
Mode
D20383: [PowerPC64] starting from FreeBSD 13.0, default 64-bit ELF ABI is V2 (ELFv2)
Attached
Detach File
Event Timeline
Log In to Comment