From 55da694632505cbcbb07d5a743f7809daab13d41 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 2 Mar 2024 12:38:00 +0800 Subject: [PATCH] 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 --- ceph.spec.in | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index 6e5f1a0ec2e..f8ec72acef7 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -141,7 +141,11 @@ %{!?python3_pkgversion: %global python3_pkgversion 3} %{!?python3_version_nodots: %global python3_version_nodots 3} %{!?python3_version: %global python3_version 3} +%if 0%{with seastar} +%{!?gts_version: %global gts_version 13} +%else %{!?gts_version: %global gts_version 11} +%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 @@ -186,9 +190,17 @@ # 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 && 0%{?enable_devtoolset11:1} +%if 0%{?rhel} == 8 +%if 0%{gts_version} == 13 +%if 0%{?enable_devtoolset13:1} +%enable_devtoolset13 +%endif +%else +%if 0%{?enable_devtoolset11:1} %enable_devtoolset11 %endif +%endif +%endif ################################################################################# # main package definition @@ -244,7 +256,11 @@ BuildRequires: gcc11-c++ %endif %if 0%{?rhel} == 8 BuildRequires: gcc-toolset-%{gts_version}-gcc-c++ +%if 0%{?gts_version} >= 12 +BuildRequires: gcc-toolset-%{gts_version}-runtime +%else BuildRequires: gcc-toolset-%{gts_version}-build +%endif BuildRequires: gcc-toolset-%{gts_version}-libatomic-devel %endif %if 0%{?fedora} || 0%{?rhel} == 9 || 0%{?openEuler} @@ -372,8 +388,12 @@ BuildRequires: libasan BuildRequires: protobuf-devel BuildRequires: protobuf-compiler %if 0%{?rhel} == 8 +%if 0%{?gts_version} >= 12 +BuildRequires: gcc-toolset-%{gts_version}-gcc-plugin-annobin +%else BuildRequires: gcc-toolset-%{gts_version}-annobin BuildRequires: gcc-toolset-%{gts_version}-annobin-plugin-gcc +%endif BuildRequires: gcc-toolset-%{gts_version}-libubsan-devel BuildRequires: gcc-toolset-%{gts_version}-libasan-devel %endif -- 2.39.5