]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: reenable lto for gcc-toolset-13 by requiring 13.3
authorCasey Bodley <cbodley@redhat.com>
Fri, 26 Jul 2024 20:43:40 +0000 (16:43 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 1 Oct 2025 20:57:01 +0000 (16:57 -0400)
referenced gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113359
shows that it was resolved for 13.3. reenable lto for gcc-toolset-13 by
requiring 13.3 or later

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 75c94ffc568f9cac68d5146150a5225d71f7d5e5)

ceph.spec.in

index 859ed9505a696e8359578c46a329ae639e52b67c..5f4267c052bde04f1aa8ed93fc638937b1983322 100644 (file)
 %endif
 %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
-# 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
+# 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 )
+%if (0%{?rhel} && 0%{?rhel} < 9) || ( 0%{?suse_version} && 0%{?suse_version} <= 1500 )
 %define _lto_cflags %{nil}
 %endif
 
@@ -267,7 +260,17 @@ BuildRequires:     gcc-c++ >= 11
 BuildRequires: gcc11-c++
 %endif
 %if 0%{?gts_version} > 0
+%if 0%{?gts_version} == 13
+# Before 13.3, an lto bug resulted in a segfault in SafeTimer and perhaps
+# elsewhere. Require the fixed version so we can reenable lto. See
+# ceph bug https://tracker.ceph.com/issues/63867
+# and
+# gcc bug https://bugzilla.redhat.com/show_bug.cgi?id=2241339
+# for details.
+BuildRequires: gcc-toolset-%{gts_version}-gcc-c++ >= 13.3
+%else
 BuildRequires: gcc-toolset-%{gts_version}-gcc-c++
+%endif
 %if 0%{?gts_version} >= 12
 BuildRequires: gcc-toolset-%{gts_version}-runtime
 %else