[PATCH] D67119: On PowerPC, Secure-PLT by default for FreeBSD 13 and higher
Dimitry Andric via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 11:17:17 PDT 2019
dim created this revision.
dim added reviewers: emaste, jhibbits, hfinkel.
Herald added subscribers: steven.zhang, shchenz, jsji, MaskRay, kbarton, krytarowski, nemanjai.
Herald added a project: clang.
In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and
higher transitioned to Secure-PLT for PowerPC. This part contains the
changes in clang's PPC architecture defaults.
Repository:
rC Clang
https://reviews.llvm.org/D67119
Files:
lib/Driver/ToolChains/Arch/PPC.cpp
Index: lib/Driver/ToolChains/Arch/PPC.cpp
===================================================================
--- lib/Driver/ToolChains/Arch/PPC.cpp
+++ lib/Driver/ToolChains/Arch/PPC.cpp
@@ -115,7 +115,8 @@
const ArgList &Args) {
if (Args.getLastArg(options::OPT_msecure_plt))
return ppc::ReadGOTPtrMode::SecurePlt;
- if (Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl())
+ if ((Triple.isOSFreeBSD() && Triple.getOSMajorVersion() >= 13) ||
+ Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl())
return ppc::ReadGOTPtrMode::SecurePlt;
else
return ppc::ReadGOTPtrMode::Bss;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67119.218500.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190903/f59d8a59/attachment-0001.bin>
More information about the cfe-commits
mailing list