From d1e4027fbcdc299242ec9b63a8658afe260ba509 Mon Sep 17 00:00:00 2001 From: mortimer Date: Mon, 1 Apr 2019 11:29:16 +0000 Subject: Consume SSP options when using retguard to prevent warnings. ok millert@ --- gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu') 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); -- cgit v1.2.3