]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
build: fix atomic linking with LTO on s390x private-jcaratza-ceph-6.0-bz2108325-2-patches
authorKen Dreyer <kdreyer@redhat.com>
Mon, 18 Jul 2022 19:06:06 +0000 (15:06 -0400)
committerJustin Caratzas <jcaratza@redhat.com>
Tue, 20 Sep 2022 03:12:48 +0000 (23:12 -0400)
commit0e07d965f93dd9f2606d541f26cfd050cc4c1e54
treed9286fdf341db2e399b7f018e5aaec73d2e4d03c
parente62b1bbc4b540008dc6404761439124b9cedc6ef
build: fix atomic linking with LTO on s390x

Prior to this change, Fedora and RHEL 9 on s390x would incorrectly pass
the HAVE_CXX11_ATOMIC check. As a consequence, the rest of Ceph would
fail to link because of missing atomic methods "__atomic_load_16",
"__atomic_store_16", "__atomic_compare_exchange_16".

Mark this method so that it is not optimized out, even with LTO. With
this change, s390x properly fails HAVE_CXX11_ATOMIC and falls back to
HAVE_LIBATOMIC.

Move the "BuildRequires: libatomic" RPM line out from the seastar+fedora
conditional and into the main fedora+rhel conditional so that the
HAVE_LIBATOMIC check will pass.

Fixes: https://tracker.ceph.com/issues/54514
Fixes: https://tracker.ceph.com/issues/56492
Co-authored-by: Kaleb S. Keithley <kkeithle@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
ceph.spec.in
cmake/modules/CheckCxxAtomic.cmake