diff --git a/0005-cmake-modules-CheckCxxAtomic.cmake.patch b/0005-cmake-modules-CheckCxxAtomic.cmake.patch new file mode 100644 index 0000000..71b7045 --- /dev/null +++ b/0005-cmake-modules-CheckCxxAtomic.cmake.patch @@ -0,0 +1,39 @@ +--- a/cmake/modules/CheckCxxAtomic.cmake 2020-03-02 12:49:20.000000000 -0500 ++++ b/cmake/modules/CheckCxxAtomic.cmake 2020-01-29 12:53:56.952149798 -0500 +@@ -10,18 +10,29 @@ + check_cxx_source_compiles(" + #include + #include ++ ++#if __s390x__ ++// 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 ++// library routines otherwise. Whether or not alignment is provably ++// OK for a std::atomic unfortunately depends on compiler version and ++// optimization levels, and also on the details of the expression. ++// We specifically test access via an otherwise unknown pointer here ++// to ensure we get the most complex case. If this access can be ++// done without libatomic, then all accesses can be done. ++bool atomic16(std::atomic *ptr) ++{ ++ return *ptr != 0; ++} ++#endif ++ + int main() { + std::atomic w1; + std::atomic w2; + std::atomic w4; + std::atomic w8; +-#ifdef __s390x__ +- // Boost needs 16-byte atomics for tagged pointers. +- std::atomic w16; +-#else +- #define w16 0 +-#endif +- return w1 + w2 + w4 + w8 + w16; ++ return w1 + w2 + w4 + w8; + } + " ${var}) + endfunction(check_cxx_atomics) diff --git a/ceph.spec b/ceph.spec index 8002d20..8087bd5 100644 --- a/ceph.spec +++ b/ceph.spec @@ -128,6 +128,7 @@ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz Patch002: 0002-src-common-CMakeLists.txt.patch Patch003: 0003-src-common-bitstr.h.patch Patch004: 0004-src-librbd-api-PoolMetadata.h.patch +Patch005: 0005-cmake-modules-CheckCxxAtomic.cmake.patch # ceph ≥ 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl #################################################################################