blob: 72743d01df548276754b7e3587e252563ae286b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 91000b21e3a9938a66b7a9d12281b807004eefcc Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 8 Aug 2018 22:06:09 -0500
Subject: [PATCH 15/28] Use ELFv2 ABI on powerpc64 musl (LLVM half)
---
src/rustllvm/PassWrapper.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 85fbc4bf37..15c3ab18d9 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -399,6 +399,12 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
Options.ThreadModel = ThreadModel::Single;
}
+ // See https://reviews.llvm.org/D52013
+ if (Trip.getArch() == llvm::Triple::ArchType::ppc64 &&
+ Trip.getEnvironment() == llvm::Triple::EnvironmentType::Musl) {
+ Options.MCOptions.ABIName = "elfv2";
+ }
+
#if LLVM_VERSION_GE(6, 0)
Optional<CodeModel::Model> CM;
#else
--
2.18.0
|