svn commit: r352030 - projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch

Dimitry Andric dim at FreeBSD.org
Sun Sep 8 10:31:36 UTC 2019


Author: dim
Date: Sun Sep  8 10:31:34 2019
New Revision: 352030
URL: https://svnweb.freebsd.org/changeset/base/352030

Log:
  Target i586 by default on the i386 architecture, since after upstream's
  change https://reviews.llvm.org/rL356631 ("[X86] Add CMPXCHG8B feature
  flag. Set it for all CPUs except i386/i486 including 'generic'. Disable
  use of CMPXCHG8B when this flag isn't set"), clang now correctly emits
  calls to __atomic_load_8, __atomic_store_8, etc. when targeting i486,
  and this means we can no longer link most modern programs, because we do
  not have a libatomic, nor support for atomic functions in libc.  See
  also PR 230888, 220822, 233725, 234976, and more probably duplicates.
  
  Note that in practice, clang has been incorrectly generating cmpxchg8b
  instructions for years now, when targeting i486.  So de facto nothing
  really changes by doing this.

Modified:
  projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp

Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp	Sun Sep  8 10:00:21 2019	(r352029)
+++ projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp	Sun Sep  8 10:31:34 2019	(r352030)
@@ -93,10 +93,10 @@ const char *x86::getX86TargetCPU(const ArgList &Args,
     return "x86-64";
 
   switch (Triple.getOS()) {
-  case llvm::Triple::FreeBSD:
   case llvm::Triple::NetBSD:
   case llvm::Triple::OpenBSD:
-    return "i486";
+    return "i486"; 
+  case llvm::Triple::FreeBSD:
   case llvm::Triple::Haiku:
     return "i586";
   default:


More information about the svn-src-projects mailing list