Commit 21f32a96 authored by Tom Stellard's avatar Tom Stellard
Browse files

Merging r355033:

------------------------------------------------------------------------
r355033 | joerg | 2019-02-27 13:46:01 -0800 (Wed, 27 Feb 2019) | 2 lines

Use Secure PLT as default on NetBSD/PowerPC.

------------------------------------------------------------------------

llvm-svn: 364258
parent d3755923
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,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.isOSOpenBSD())
  if (Triple.isOSNetBSD() || Triple.isOSOpenBSD())
    return ppc::ReadGOTPtrMode::SecurePlt;
  else
    return ppc::ReadGOTPtrMode::Bss;
+5 −0
Original line number Diff line number Diff line
@@ -446,3 +446,8 @@
// PTHREAD-NOT: _POSIX_THREADS
// PTHREAD:     _REENTRANT
// PTHREAD-NOT: _POSIX_THREADS

// Check PowerPC for Secure PLT
// RUN: %clang -target powerpc-unknown-netbsd -### -c %s 2>&1 \
// RUN:   | FileCheck -check-prefix=POWERPC-SECUREPLT %s
// POWERPC-SECUREPLT: "-target-feature" "+secure-plt"