summaryrefslogtreecommitdiff
path: root/gnu/llvm/tools
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2018-08-12 17:07:01 +0000
committermortimer <mortimer@cvs.openbsd.org>2018-08-12 17:07:01 +0000
commit4ff0182a70e6c36d92ab5b2472ad57f18792f7b5 (patch)
treefe75d73d844670d305d1e310756d1d18a6b126d6 /gnu/llvm/tools
parenta466ca26e9d453aaeb0c4de1551426d89a376cf9 (diff)
Add retguard for arm64.
ok deraadt@
Diffstat (limited to 'gnu/llvm/tools')
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
index 91a656f4a48..5c3953bd478 100644
--- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
@@ -3979,7 +3979,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
RetProtector = 1;
}
if (RetProtector &&
- (getToolChain().getArch() == llvm::Triple::x86_64) &&
+ ((getToolChain().getArch() == llvm::Triple::x86_64) ||
+ (getToolChain().getArch() == llvm::Triple::aarch64)) &&
!Args.hasArg(options::OPT_fno_stack_protector) &&
!Args.hasArg(options::OPT_pg)) {
CmdArgs.push_back(Args.MakeArgString("-D_RET_PROTECTOR"));