summaryrefslogtreecommitdiff
path: root/user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-09-19 02:31:46 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-25 00:08:16 +0000
commitcd980d29292f8f5d6bb8bef5773ce91b95bfb90a (patch)
tree7eeb0fd1825894538eea675625a9f3009f3fca9d /user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch
parent63266fdc6f2014cc6dfd0f983e13de7c378bc708 (diff)
downloadpackages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.gz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.bz2
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.xz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.zip
user/rust: new package
Diffstat (limited to 'user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch')
-rw-r--r--user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch b/user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch
new file mode 100644
index 000000000..72743d01d
--- /dev/null
+++ b/user/rust/0015-Use-ELFv2-ABI-on-powerpc64-musl-LLVM-half.patch
@@ -0,0 +1,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
+