]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph.spec.in: use gcc-toolset 13 for crimson build
authorKefu Chai <tchaikov@gmail.com>
Sat, 2 Mar 2024 04:38:00 +0000 (12:38 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 11 Mar 2024 10:28:17 +0000 (18:28 +0800)
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 <tchaikov@gmail.com>
ceph.spec.in

index 6e5f1a0ec2e730a633b15b13869495cfd4fafc5d..f8ec72acef7691d264dc39cf09bf5070b527aa39 100644 (file)
 %{!?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
 # 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