]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: disable lto to work around gcc-toolset-13 linker bug
authorSamuel Just <sjust@redhat.com>
Fri, 8 Mar 2024 04:03:03 +0000 (04:03 +0000)
committerKefu Chai <tchaikov@gmail.com>
Mon, 11 Mar 2024 10:28:17 +0000 (18:28 +0800)
gcc-toolset-13 lto can trigger a linker bug resulting in a segfault in
SafeTimer (and perhaps elsewhere).  See
https://tracker.ceph.com/issues/63867 for details.  This patch disables
lto for now now so that we can switch to gcc-toolset-13.

Fixes: https://tracker.ceph.com/issues/63867
Signed-off-by: Samuel Just <sjust@redhat.com>
ceph.spec.in

index b8c67a62ead54be80c3df33b8561565367215347..6e5f1a0ec2e730a633b15b13869495cfd4fafc5d 100644 (file)
 %{!?python3_version: %global python3_version 3}
 %{!?gts_version: %global gts_version 11}
 
+# 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
+# ceph bug https://tracker.ceph.com/issues/63867
+# and
+# gcc bug https://bugzilla.redhat.com/show_bug.cgi?id=2241339
+# for details.
+#
+# Also disable lto on systems that do not support symver attribute
+# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 for details
+%if 0%{?gts_version} == 13 || (0%{?rhel} && 0%{?rhel} < 9)  || ( 0%{?suse_version} && 0%{?suse_version} <= 1500 )
+%define _lto_cflags %{nil}
+%endif
+
 %if ! 0%{?suse_version}
 # use multi-threaded xz compression: xz level 7 using ncpus threads
 %global _source_payload w7T%{_smp_build_ncpus}.xzdio
@@ -1334,11 +1347,6 @@ This package provides a Ceph hardware monitoring agent.
 %autosetup -p1 -n @TARBALL_BASENAME@
 
 %build
-# Disable lto on systems that do not support symver attribute
-# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 for details
-%if ( 0%{?rhel} && 0%{?rhel} < 9 ) || ( 0%{?suse_version} && 0%{?suse_version} <= 1500 )
-%define _lto_cflags %{nil}
-%endif
 
 %if 0%{with cephfs_java}
 # Find jni.h