From 79874a04dd950d17ea375daac7bce76146499bfe Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 30 May 2019 02:13:15 +0000 Subject: [PATCH] [PowerPC] Set the default PLT mode on musl to Secure PLT The musl libc only supports Secure PLT. Patch by A. Wilcox! Reviewed By: jhibbits Differential Revision: https://reviews.llvm.org/D59185 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362051 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/Arch/PPC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains/Arch/PPC.cpp b/lib/Driver/ToolChains/Arch/PPC.cpp index f0a3271564..30f1a0d902 100644 --- a/lib/Driver/ToolChains/Arch/PPC.cpp +++ b/lib/Driver/ToolChains/Arch/PPC.cpp @@ -115,7 +115,7 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Driver &D, const llvm::Tripl const ArgList &Args) { if (Args.getLastArg(options::OPT_msecure_plt)) return ppc::ReadGOTPtrMode::SecurePlt; - if (Triple.isOSNetBSD() || Triple.isOSOpenBSD()) + if (Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) return ppc::ReadGOTPtrMode::SecurePlt; else return ppc::ReadGOTPtrMode::Bss; -- 2.40.0