From 5c038b99b34047d0ab39eb97221cc188b42b6b3a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 8 Aug 2020 14:33:01 +0800 Subject: [PATCH] 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 --- ceph.spec.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 840c97437a8..2f1dbc79cca 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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 -- 2.39.5