riscv64: fix 16-byte atomic build error
Ceph source include boost package. Boost not implement atomic functions for RISC-V. Set riscv to the ceph autodect arches.
This commit is contained in:
parent
77661c60b8
commit
9ec8579c89
11
0022-add-atomic-library-for-riscv64.patch
Normal file
11
0022-add-atomic-library-for-riscv64.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/cmake/modules/CheckCxxAtomic.cmake 2023-08-23 14:08:23.304911386 +0800
|
||||
+++ b/cmake/modules/CheckCxxAtomic.cmake 2023-08-23 14:09:10.994614880 +0800
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
-#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64)
|
||||
+#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64) || defined(__riscv)
|
||||
// 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
|
||||
@ -129,7 +129,7 @@
|
||||
#################################################################################
|
||||
Name: ceph
|
||||
Version: 16.2.7
|
||||
Release: 22
|
||||
Release: 23
|
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
|
||||
Epoch: 2
|
||||
%endif
|
||||
@ -168,6 +168,7 @@ Patch18: 0018-Fix-Python-3.10-PEP-620-incompatibility.patch
|
||||
Patch19: 0019-include-memory.patch
|
||||
Patch20: 0020-compiled-with-gcc12.patch
|
||||
Patch21: 0021-boost-enable-sw64-architecture.patch
|
||||
Patch22: 0022-add-atomic-library-for-riscv64.patch
|
||||
%if 0%{?suse_version}
|
||||
# _insert_obs_source_lines_here
|
||||
ExclusiveArch: x86_64 aarch64 ppc64le s390x
|
||||
@ -422,6 +423,8 @@ BuildRequires: /usr/bin/pathfix.py
|
||||
%ifarch loongarch64
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: boost-random
|
||||
%endif
|
||||
%ifarch loongarch64 riscv64
|
||||
BuildRequires: libatomic
|
||||
%endif
|
||||
|
||||
@ -2531,6 +2534,9 @@ exit 0
|
||||
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
|
||||
|
||||
%changelog
|
||||
* Wed Aug 23 2023 laokz <zhangkai@iscas.ac.cn> - 2:16.2.7-23
|
||||
- fix riscv64 16-byte atomic build error
|
||||
|
||||
* Mon Aug 21 2023 liuqinfei <lucas.liuqinfei@huawei.com> - 2:16.2.7-22
|
||||
- fix conflicts among multiple processor architectures
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user