]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph.spec.in: use gcc-toolset-9 for building crimson
authorKefu Chai <kchai@redhat.com>
Sat, 8 Aug 2020 06:33:01 +0000 (14:33 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 15 Aug 2020 09:43:40 +0000 (17:43 +0800)
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>
ceph.spec.in

index 840c97437a80cc3b1c775aafdc499ce679886fb2..2f1dbc79ccaa6231ba47fa9b62084d983a04e175 100644 (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 Ceph’s 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