Origin: upstream, https://github.com/ceph/ceph/commit/
709a77f22010f03aee4a4c0ab930588944cb4a58
Last-Update: 2021-11-24
it's reported that a mips64el build host is able to pass the test of
CheckCxxAtomic without linking against libatomic, while librbd.so
fails to link due to failures like
/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_store_16'
/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_load_16'
/usr/bin/ld: ../../../lib/librbd.so.1.16.0: undefined reference to `__atomic_compare_exchange_16'
so we have to check the existence of __atomic_load_16 instruction on
mips architecture.
Gbp-Pq: Name cmake-test-for-16-bytes-atomic-support-on-mips-also.patch
#include <atomic>
#include <cstdint>
-#if __s390x__
+#if defined(__s390x__) || (defined(__mips__) && _MIPS_SIM ==_ABI64 )
// Boost needs 16-byte atomics for tagged pointers.
// These are implemented via inline instructions on the platform
// if 16-byte alignment can be proven, and are delegated to libatomic