artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df816d4
)
Make -mbranch-protection=bti the default on OpenBSD.
author
kettenis
<kettenis@openbsd.org>
Mon, 17 Apr 2023 18:10:26 +0000
(18:10 +0000)
committer
kettenis
<kettenis@openbsd.org>
Mon, 17 Apr 2023 18:10:26 +0000
(18:10 +0000)
ok deraadt@
gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
patch
|
blob
|
history
diff --git
a/gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
b/gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
index
c2519ca
..
67d4c1d
100644
(file)
--- a/
gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/
gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
@@
-1818,6
+1818,9
@@
void Clang::AddAArch64TargetArgs(const ArgList &Args,
Args.MakeArgString(Twine("-msign-return-address-key=") + Key));
if (IndirectBranches)
CmdArgs.push_back("-mbranch-target-enforce");
+ } else {
+ if (Triple.isOSOpenBSD())
+ CmdArgs.push_back("-mbranch-target-enforce");
}
// Handle -msve_vector_bits=<bits>