cmake: test for 16-byte atomic support on mips also
authorKefu Chai <tchaikov@gmail.com>
Tue, 23 Nov 2021 16:40:54 +0000 (00:40 +0800)
committerThomas Goirand <zigo@debian.org>
Fri, 15 Jul 2022 15:27:25 +0000 (16:27 +0100)
commite928338a63b0ba8492f5cdfecddcedc09ca580a5
tree86f336ec19ef6735d73e0ce3ebb307f8cc15435b
parent86f93b251ff9a03f810f69419f94777ffc3c32aa
cmake: test for 16-byte atomic support on mips also

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
cmake/modules/CheckCxxAtomic.cmake