git: 3720e5486934 - stable/12 - [libcxx] Fix atomic type for mips32 on gcc to work w/out needing libatomic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Dec 2021 10:06:23 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3720e548693435acacc50b506406d7192291b7e8 commit 3720e548693435acacc50b506406d7192291b7e8 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2020-10-18 17:31:10 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-12-22 10:01:21 +0000 [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 (cherry picked from commit d061adc48d54ebb91b1709b16c59e8ceca895be2) --- contrib/llvm-project/libcxx/include/atomic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/atomic b/contrib/llvm-project/libcxx/include/atomic index 9c2898653788..2dfb6f7b8131 100644 --- a/contrib/llvm-project/libcxx/include/atomic +++ b/contrib/llvm-project/libcxx/include/atomic @@ -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