Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2020 17:31:11 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366814 - head/contrib/llvm-project/libcxx/include
Message-ID:  <202010181731.09IHVB5Y074595@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Oct 18 17:31:10 2020
New Revision: 366814
URL: https://svnweb.freebsd.org/changeset/base/366814

Log:
  [libcxx] Fix atomic type for mips32 on gcc to work w/out needing libatomic
  
  When compiling this for mips32 on gcc-6.x, we'd hit issues where we
  don't have 64 bit atomics on mips32.
  
  gcc implements this using libatomic, which we don't currently include
  in our freebsd-gcc compiler packages.
  
  So for now add this work around so mips32 works.  It's also fine for
  mips64.  We can fix this later once we get libatomic included.
  
  Approved by:	dim
  Differential Revision:	https://reviews.freebsd.org/D26774

Modified:
  head/contrib/llvm-project/libcxx/include/atomic

Modified: head/contrib/llvm-project/libcxx/include/atomic
==============================================================================
--- head/contrib/llvm-project/libcxx/include/atomic	Sun Oct 18 17:15:47 2020	(r366813)
+++ head/contrib/llvm-project/libcxx/include/atomic	Sun Oct 18 17:31:10 2020	(r366814)
@@ -1480,11 +1480,11 @@ struct __cxx_atomic_impl : public _Base {
     : _Base(value) {}
 };
 
-#ifdef __linux__
+#if defined(__linux__) || (defined(__FreeBSD__) && defined(__mips__))
     using __cxx_contention_t = int32_t;
 #else
     using __cxx_contention_t = int64_t;
-#endif //__linux__
+#endif
 
 #if _LIBCPP_STD_VER >= 11
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010181731.09IHVB5Y074595>