diff options
author | Tom Stellard <tstellar@redhat.com> | 2019-06-25 00:37:55 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2019-06-25 00:37:55 +0000 |
commit | 21f32a9683fcd7114c18e24463a55377c9efb8ac (patch) | |
tree | 019e727e4deafff3c434f71d67338ef4a6273521 | |
parent | d37559239de81b23fdad253669e43185f9a71195 (diff) | |
download | llvm-21f32a9683fcd7114c18e24463a55377c9efb8ac.zip llvm-21f32a9683fcd7114c18e24463a55377c9efb8ac.tar.gz llvm-21f32a9683fcd7114c18e24463a55377c9efb8ac.tar.bz2 |
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
-rw-r--r-- | clang/lib/Driver/ToolChains/Arch/PPC.cpp | 2 | ||||
-rw-r--r-- | clang/test/Driver/netbsd.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Arch/PPC.cpp b/clang/lib/Driver/ToolChains/Arch/PPC.cpp index 791f120..e83c263 100644 --- a/clang/lib/Driver/ToolChains/Arch/PPC.cpp +++ b/clang/lib/Driver/ToolChains/Arch/PPC.cpp @@ -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; diff --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c index f5352e2..221264a 100644 --- a/clang/test/Driver/netbsd.c +++ b/clang/test/Driver/netbsd.c @@ -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" |