From b7eb8d0155e64a28d87dd31ea5e4d4fce479681c Mon Sep 17 00:00:00 2001
From: "Alexander A. Klimov" <alexander.klimov@icinga.com>
Date: Fri, 21 May 2021 09:28:46 +0000
Subject: [PATCH] Disable LTO build

---
 icinga2.spec | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/icinga2.spec b/icinga2.spec
index 9472b99..da54fea 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -364,14 +364,9 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON"
 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=OFF"
 %endif
 
-# Disable LTO build for older compiler versions
-# see https://github.com/Icinga/icinga2/issues/7149
+# Disable LTO build, see https://github.com/Icinga/icinga2/issues/7149
 # lto1: internal compiler error: in prune_unused_types_prune, at dwarf2out.c
-%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1315 || "%{_vendor}" == "redhat" && (0%{?el7} || 0%{?rhel} == 7 || "%{?dist}" == ".el7")
-CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=ON"
-%else # suse_version 1315
 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=OFF"
-%endif # suse_version 1315
 
 %if %{with systemd_and_init}
 CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON"
-- 
GitLab