From 6b93a26bbafbfe94f22b895c0677f3e532393fcb Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 21 Apr 2019 02:29:33 +0000 Subject: user/llvm8: bump to 8.0.0 --- user/llvm8/more-secure-plt.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 user/llvm8/more-secure-plt.patch (limited to 'user/llvm8/more-secure-plt.patch') diff --git a/user/llvm8/more-secure-plt.patch b/user/llvm8/more-secure-plt.patch new file mode 100644 index 000000000..6728e2765 --- /dev/null +++ b/user/llvm8/more-secure-plt.patch @@ -0,0 +1,28 @@ +--- a/lib/Target/PowerPC/PPCSubtarget.cpp ++++ b/lib/Target/PowerPC/PPCSubtarget.cpp +@@ -138,6 +138,10 @@ + if (isDarwin()) + HasLazyResolverStubs = true; + ++ // Set up musl-specific properties. ++ if (TargetTriple.getEnvironment() == Triple::Musl) ++ SecurePlt = true; ++ + if (HasSPE && IsPPC64) + report_fatal_error( "SPE is only supported for 32-bit targets.\n", false); + if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU)) +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) + return Reloc::PIC_; + ++ // musl needs SecurePlt, which depends on PIC. ++ if (TT.getEnvironment() == Triple::Musl) ++ return Reloc::PIC_; ++ + // Rest are static by default. + return Reloc::Static; + } -- cgit v1.2.3-60-g2f50