From: Kefu Chai Date: Sat, 8 Aug 2020 06:33:01 +0000 (+0800) Subject: ceph.spec.in: use gcc-toolset-9 for building crimson X-Git-Tag: v16.1.0~1425^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c038b99b34047d0ab39eb97221cc188b42b6b3a;p=ceph.git 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 --- diff --git a/ceph.spec.in b/ceph.spec.in index 840c97437a80..2f1dbc79ccaa 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