diff options
author | Ken Dreyer <kdreyer@redhat.com> | 2022-07-18 21:06:06 +0200 |
---|---|---|
committer | Ken Dreyer <kdreyer@redhat.com> | 2022-07-18 21:19:02 +0200 |
commit | fbb1ccc963152e6d1798e56bb7b8fb2f0885cc01 (patch) | |
tree | 4dc54d7e1d3ddc5c0dd928af5497685adc4642d0 /ceph.spec.in | |
parent | Merge pull request #47136 from idryomov/wip-48038 (diff) | |
download | ceph-fbb1ccc963152e6d1798e56bb7b8fb2f0885cc01.tar.xz ceph-fbb1ccc963152e6d1798e56bb7b8fb2f0885cc01.zip |
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>
Diffstat (limited to 'ceph.spec.in')
-rw-r--r-- | ceph.spec.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ceph.spec.in b/ceph.spec.in index becee7bb748..d06a9fe5468 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -324,7 +324,6 @@ BuildRequires: systemtap-sdt-devel %if 0%{?fedora} BuildRequires: libubsan BuildRequires: libasan -BuildRequires: libatomic %endif %if 0%{?rhel} BuildRequires: gcc-toolset-11-annobin-plugin-gcc @@ -366,6 +365,7 @@ Requires: systemd BuildRequires: boost-random BuildRequires: nss-devel BuildRequires: keyutils-libs-devel +BuildRequires: libatomic BuildRequires: libibverbs-devel BuildRequires: librdmacm-devel BuildRequires: ninja-build |