From 913d127c8116ef6f0066d75cfdbba3811939936d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 2 Mar 2024 12:44:56 +0800 Subject: [PATCH] ceph.spec.in: use gcc-toolset when with seastar or rhel 8 both RHEL8 and RHEL9 have gcc-toolset 13, and we need to use gts-13 for building crimson, so let's enable it when building crimson, and we need to use gts-11 when building on RHEL7. hence this change. Signed-off-by: Kefu Chai --- ceph.spec.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index f8ec72acef7..52a8faad5ff 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -144,8 +144,10 @@ %if 0%{with seastar} %{!?gts_version: %global gts_version 13} %else +%if 0%{?rhel} == 8 %{!?gts_version: %global gts_version 11} %endif +%endif # gcc-toolset-13 seems to trigger a linker bug resulting in a segfault in SafeTimer # and perhaps elsewhere. For now, let's just disable it. See @@ -190,7 +192,7 @@ # do not provide gcc-annobin.so anymore, despite that they provide annobin.so. but # redhat-rpm-config still passes -fplugin=gcc-annobin to the compiler. %undefine _annotated_build -%if 0%{?rhel} == 8 +%if 0%{?gts_version} > 0 %if 0%{gts_version} == 13 %if 0%{?enable_devtoolset13:1} %enable_devtoolset13 @@ -254,7 +256,7 @@ BuildRequires: gcc-c++ >= 11 %if 0%{?suse_version} == 1500 BuildRequires: gcc11-c++ %endif -%if 0%{?rhel} == 8 +%if 0%{?gts_version} > 0 BuildRequires: gcc-toolset-%{gts_version}-gcc-c++ %if 0%{?gts_version} >= 12 BuildRequires: gcc-toolset-%{gts_version}-runtime @@ -387,7 +389,7 @@ BuildRequires: libubsan BuildRequires: libasan BuildRequires: protobuf-devel BuildRequires: protobuf-compiler -%if 0%{?rhel} == 8 +%if 0%{?gts_version} > 0 %if 0%{?gts_version} >= 12 BuildRequires: gcc-toolset-%{gts_version}-gcc-plugin-annobin %else -- 2.39.5