]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph.spec.in: use gcc-toolset when with seastar or rhel 8
authorKefu Chai <tchaikov@gmail.com>
Sat, 2 Mar 2024 04:44:56 +0000 (12:44 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 11 Mar 2024 10:28:17 +0000 (18:28 +0800)
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 <tchaikov@gmail.com>
ceph.spec.in

index f8ec72acef7691d264dc39cf09bf5070b527aa39..52a8faad5fffaa3ae3d3183239d91a22f8628819 100644 (file)
 %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
 # 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