Skip to content

Commit 55da694

Browse files
committed
ceph.spec.in: use gcc-toolset 13 for crimson build
since gts 13 is out, and GCC-13 brings better support of C++20 coroutines, and because clang prefers using a newer gts when its gcc is around. so let's bump up the gcc-toolset from 11 to 13 when building crimson. because gcc-toolset-13 LTO triggers a linker bug resulting in a segfault in SafeTimer, see https://tracker.ceph.com/issues/63867 , we cannot switch the classic build to gts 13 without proving that it does not incur performance regressions. since annobin plugin package was renamed to gcc-toolset-13-gcc-plugin-annobin, let's update its name accordingly. and use -runtime subpackage instead of -build, as macros.gcc-toolset-13-enable is now located in -runtime subpackage since devtoolset12 Signed-off-by: Kefu Chai <[email protected]>
1 parent a164f5f commit 55da694

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

ceph.spec.in

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@
141141
%{!?python3_pkgversion: %global python3_pkgversion 3}
142142
%{!?python3_version_nodots: %global python3_version_nodots 3}
143143
%{!?python3_version: %global python3_version 3}
144+
%if 0%{with seastar}
145+
%{!?gts_version: %global gts_version 13}
146+
%else
144147
%{!?gts_version: %global gts_version 11}
148+
%endif
145149

146150
# gcc-toolset-13 seems to trigger a linker bug resulting in a segfault in SafeTimer
147151
# and perhaps elsewhere. For now, let's just disable it. See
@@ -186,9 +190,17 @@
186190
# do not provide gcc-annobin.so anymore, despite that they provide annobin.so. but
187191
# redhat-rpm-config still passes -fplugin=gcc-annobin to the compiler.
188192
%undefine _annotated_build
189-
%if 0%{?rhel} == 8 && 0%{?enable_devtoolset11:1}
193+
%if 0%{?rhel} == 8
194+
%if 0%{gts_version} == 13
195+
%if 0%{?enable_devtoolset13:1}
196+
%enable_devtoolset13
197+
%endif
198+
%else
199+
%if 0%{?enable_devtoolset11:1}
190200
%enable_devtoolset11
191201
%endif
202+
%endif
203+
%endif
192204

193205
#################################################################################
194206
# main package definition
@@ -244,7 +256,11 @@ BuildRequires: gcc11-c++
244256
%endif
245257
%if 0%{?rhel} == 8
246258
BuildRequires: gcc-toolset-%{gts_version}-gcc-c++
259+
%if 0%{?gts_version} >= 12
260+
BuildRequires: gcc-toolset-%{gts_version}-runtime
261+
%else
247262
BuildRequires: gcc-toolset-%{gts_version}-build
263+
%endif
248264
BuildRequires: gcc-toolset-%{gts_version}-libatomic-devel
249265
%endif
250266
%if 0%{?fedora} || 0%{?rhel} == 9 || 0%{?openEuler}
@@ -372,8 +388,12 @@ BuildRequires: libasan
372388
BuildRequires: protobuf-devel
373389
BuildRequires: protobuf-compiler
374390
%if 0%{?rhel} == 8
391+
%if 0%{?gts_version} >= 12
392+
BuildRequires: gcc-toolset-%{gts_version}-gcc-plugin-annobin
393+
%else
375394
BuildRequires: gcc-toolset-%{gts_version}-annobin
376395
BuildRequires: gcc-toolset-%{gts_version}-annobin-plugin-gcc
396+
%endif
377397
BuildRequires: gcc-toolset-%{gts_version}-libubsan-devel
378398
BuildRequires: gcc-toolset-%{gts_version}-libasan-devel
379399
%endif

0 commit comments

Comments
 (0)