From 3063e1e56b509373d143a3a4c67d388bd390f268 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 25 Nov 2020 14:26:13 +0000 Subject: clang: allow -fstack-clash-protection on FreeBSD -fstack-clash-protection was added in Clang commit e67cbac81211 but was enabled only on Linux. It should work fine on FreeBSD as well, so enable it. To be discussed and upstreamed with a test. The OS test should probably just be removed. Reviewed by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27366 --- contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index af4bcf951e6c..01024ee3a16a 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -2967,7 +2967,7 @@ static void RenderSCPOptions(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) { const llvm::Triple &EffectiveTriple = TC.getEffectiveTriple(); - if (!EffectiveTriple.isOSLinux()) + if (!EffectiveTriple.isOSFreeBSD() && !EffectiveTriple.isOSLinux()) return; if (!EffectiveTriple.isX86() && !EffectiveTriple.isSystemZ() && -- cgit v1.2.3