summaryrefslogtreecommitdiff
path: root/user/llvm7/more-secure-plt.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-10 04:58:28 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-10 04:58:28 +0000
commit85d91d9382e6cb69db2924c9e676fc8d8a6d25ff (patch)
treea0f482fab77a45f506b07bfef7c71720c222adc3 /user/llvm7/more-secure-plt.patch
parentc23245949e225b85a221a13fb24238473306cb0b (diff)
downloadpackages-85d91d9382e6cb69db2924c9e676fc8d8a6d25ff.tar.gz
packages-85d91d9382e6cb69db2924c9e676fc8d8a6d25ff.tar.bz2
packages-85d91d9382e6cb69db2924c9e676fc8d8a6d25ff.tar.xz
packages-85d91d9382e6cb69db2924c9e676fc8d8a6d25ff.zip
user/llvm: bump to 7.0.1
Diffstat (limited to 'user/llvm7/more-secure-plt.patch')
-rw-r--r--user/llvm7/more-secure-plt.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/user/llvm7/more-secure-plt.patch b/user/llvm7/more-secure-plt.patch
new file mode 100644
index 000000000..64920c74c
--- /dev/null
+++ b/user/llvm7/more-secure-plt.patch
@@ -0,0 +1,15 @@
+diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
+index c583fba8cab..6a9eedf89c5 100644
+--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -222,6 +222,10 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
+ if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le)
+ return Reloc::PIC_;
+
++ // musl needs SecurePlt, which depends on PIC.
++ if (TT.getEnvironment() == Triple::Musl)
++ return Reloc::PIC_;
++
+ // 32-bit is static by default.
+ return Reloc::Static;
+ }