]> granicus.if.org Git - clang/commitdiff
[PowerPC] Set the default PLT mode on musl to Secure PLT
authorFangrui Song <maskray@google.com>
Thu, 30 May 2019 02:13:15 +0000 (02:13 +0000)
committerFangrui Song <maskray@google.com>
Thu, 30 May 2019 02:13:15 +0000 (02:13 +0000)
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

index f0a3271564cf6292fab3ea020121e07094f79cca..30f1a0d9022c2bc0166c317a83f07edd2affdce5 100644 (file)
@@ -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;