ceph.spec.in: use gcc-toolset-9 for building crimson

since seastar dropped support from C++14, we have to move to a compiler
with a decent C++17 support.

in this change, gcc-toolset-9 is used for compiling ceph if seastar is
enabled. use version >= 9.2.1-2.2, because of
https://bugzilla.redhat.com/show_bug.cgi?id=1853900

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-08-08 14:33:01 +08:00
parent 4fea9a8be3
commit 5c038b99b3

View File

@ -134,7 +134,11 @@ BuildRequires: gperf
BuildRequires: cmake > 3.5
BuildRequires: cryptsetup
BuildRequires: fuse-devel
%if 0%{with seastar}
BuildRequires: gcc-toolset-9-gcc-c++ >= 9.2.1-2.3
%else
BuildRequires: gcc-c++
%endif
BuildRequires: gdbm
%if 0%{with tcmalloc}
%if 0%{?fedora} || 0%{?rhel}
@ -207,6 +211,12 @@ BuildRequires: fmt-devel
BuildRequires: libubsan
BuildRequires: libasan
BuildRequires: libatomic
%if 0%{with seastar}
BuildRequires: gcc-toolset-9-annobin
BuildRequires: gcc-toolset-9-libubsan-devel
BuildRequires: gcc-toolset-9-libasan-devel
BuildRequires: gcc-toolset-9-libatomic-devel
%endif
%endif
%endif
#################################################################################
@ -1076,6 +1086,10 @@ This package provides Cephs default alerts for Prometheus.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
%define _lto_cflags %{nil}
%if 0%{with seastar}
. /opt/rh/gcc-toolset-9/enable
%endif
%if 0%{with cephfs_java}
# Find jni.h
for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do