Skip to content

Commit 913d127

Browse files
committed
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 <[email protected]>
1 parent 55da694 commit 913d127

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ceph.spec.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@
144144
%if 0%{with seastar}
145145
%{!?gts_version: %global gts_version 13}
146146
%else
147+
%if 0%{?rhel} == 8
147148
%{!?gts_version: %global gts_version 11}
148149
%endif
150+
%endif
149151

150152
# gcc-toolset-13 seems to trigger a linker bug resulting in a segfault in SafeTimer
151153
# and perhaps elsewhere. For now, let's just disable it. See
@@ -190,7 +192,7 @@
190192
# do not provide gcc-annobin.so anymore, despite that they provide annobin.so. but
191193
# redhat-rpm-config still passes -fplugin=gcc-annobin to the compiler.
192194
%undefine _annotated_build
193-
%if 0%{?rhel} == 8
195+
%if 0%{?gts_version} > 0
194196
%if 0%{gts_version} == 13
195197
%if 0%{?enable_devtoolset13:1}
196198
%enable_devtoolset13
@@ -254,7 +256,7 @@ BuildRequires: gcc-c++ >= 11
254256
%if 0%{?suse_version} == 1500
255257
BuildRequires: gcc11-c++
256258
%endif
257-
%if 0%{?rhel} == 8
259+
%if 0%{?gts_version} > 0
258260
BuildRequires: gcc-toolset-%{gts_version}-gcc-c++
259261
%if 0%{?gts_version} >= 12
260262
BuildRequires: gcc-toolset-%{gts_version}-runtime
@@ -387,7 +389,7 @@ BuildRequires: libubsan
387389
BuildRequires: libasan
388390
BuildRequires: protobuf-devel
389391
BuildRequires: protobuf-compiler
390-
%if 0%{?rhel} == 8
392+
%if 0%{?gts_version} > 0
391393
%if 0%{?gts_version} >= 12
392394
BuildRequires: gcc-toolset-%{gts_version}-gcc-plugin-annobin
393395
%else

0 commit comments

Comments
 (0)