svn commit: r368019 - head/contrib/llvm-project/clang/lib/Driver/ToolChains

Ed Maste emaste at FreeBSD.org
Wed Nov 25 14:26:14 UTC 2020


Author: emaste
Date: Wed Nov 25 14:26:13 2020
New Revision: 368019
URL: https://svnweb.freebsd.org/changeset/base/368019

Log:
  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

Modified:
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp

Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
==============================================================================
--- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp	Wed Nov 25 11:21:03 2020	(r368018)
+++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp	Wed Nov 25 14:26:13 2020	(r368019)
@@ -2967,7 +2967,7 @@ static void RenderSCPOptions(const ToolChain &TC, cons
                              ArgStringList &CmdArgs) {
   const llvm::Triple &EffectiveTriple = TC.getEffectiveTriple();
 
-  if (!EffectiveTriple.isOSLinux())
+  if (!EffectiveTriple.isOSFreeBSD() && !EffectiveTriple.isOSLinux())
     return;
 
   if (!EffectiveTriple.isX86() && !EffectiveTriple.isSystemZ() &&


More information about the svn-src-head mailing list