summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2019-04-01 11:29:16 +0000
committermortimer <mortimer@cvs.openbsd.org>2019-04-01 11:29:16 +0000
commitd1e4027fbcdc299242ec9b63a8658afe260ba509 (patch)
tree36beb1dbc265e423eacd095c76e54a4f126a67d7 /gnu
parent4c7f8bf733f4f5bc19e0bd1d3607ae62bfeedb71 (diff)
Consume SSP options when using retguard to prevent warnings.
ok millert@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
index b4d4287428a..199b3dadfd7 100644
--- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
@@ -4119,6 +4119,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
!Args.hasArg(options::OPT_pg)) {
CmdArgs.push_back(Args.MakeArgString("-D_RET_PROTECTOR"));
CmdArgs.push_back(Args.MakeArgString("-ret-protector"));
+ // Consume the stack protector arguments to prevent warning
+ Args.getLastArg(options::OPT_fstack_protector_all,
+ options::OPT_fstack_protector_strong,
+ options::OPT_fstack_protector);
} else {
// If we're not using retguard, then do the usual stack protector
RenderSSPOptions(getToolChain(), Args, CmdArgs, KernelOrKext);