From: Boris Ranto Date: Tue, 3 Aug 2021 08:11:58 +0000 (+0200) Subject: rpm: Re-enable LTO on supported systems X-Git-Tag: v17.1.0~1183^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=381507a31c4740bfc75dff8f13026df89e0ccdf8;p=ceph.git rpm: Re-enable LTO on supported systems We can now use LTO when building ceph. The symver issue was fixed by using the gcc __symver__ attribute. The systems that support it can now re-enable LTO. Fixes: https://tracker.ceph.com/issues/40060 Signed-off-by: Boris Ranto --- diff --git a/ceph.spec.in b/ceph.spec.in index 4d4082394d4..b5e7435344a 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1235,9 +1235,11 @@ This package provides Ceph default alerts for Prometheus. %autosetup -p1 -n @TARBALL_BASENAME@ %build -# LTO can be enabled as soon as the following GCC bug is fixed: -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 +# 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 seastar} && 0%{?rhel} . /opt/rh/gcc-toolset-9/enable