[llvm-branch-commits] [cfe-branch] r364258 - Merging r355033:
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 24 17:37:55 PDT 2019
Author: tstellar
Date: Mon Jun 24 17:37:55 2019
New Revision: 364258
URL: http://llvm.org/viewvc/llvm-project?rev=364258&view=rev
Log:
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.
------------------------------------------------------------------------
Modified:
cfe/branches/release_80/lib/Driver/ToolChains/Arch/PPC.cpp
cfe/branches/release_80/test/Driver/netbsd.c
Modified: cfe/branches/release_80/lib/Driver/ToolChains/Arch/PPC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/lib/Driver/ToolChains/Arch/PPC.cpp?rev=364258&r1=364257&r2=364258&view=diff
==============================================================================
--- cfe/branches/release_80/lib/Driver/ToolChains/Arch/PPC.cpp (original)
+++ cfe/branches/release_80/lib/Driver/ToolChains/Arch/PPC.cpp Mon Jun 24 17:37:55 2019
@@ -116,7 +116,7 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPt
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;
Modified: cfe/branches/release_80/test/Driver/netbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/test/Driver/netbsd.c?rev=364258&r1=364257&r2=364258&view=diff
==============================================================================
--- cfe/branches/release_80/test/Driver/netbsd.c (original)
+++ cfe/branches/release_80/test/Driver/netbsd.c Mon Jun 24 17:37:55 2019
@@ -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"
More information about the llvm-branch-commits
mailing list