Skip to content
Snippets Groups Projects
Commit 76acbcf7 authored by Noah Hilverling's avatar Noah Hilverling
Browse files

Merge branch 'bugfix/sles125-lto' into 'master'

Disable LTO on SLES v12.5

See merge request !19
parents 5b1a0912 3a95e897
No related branches found
No related tags found
1 merge request!19Disable LTO on SLES v12.5
Pipeline #17562 passed
...@@ -68,15 +68,6 @@ ...@@ -68,15 +68,6 @@
%bcond_without unity_build %bcond_without unity_build
%endif %endif
# Disable lto_build for older compiler versions
# 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")
%bcond_with lto_build
%else # suse_version 1315
%bcond_without lto_build
%endif # suse_version 1315
%bcond_with systemd_and_init %bcond_with systemd_and_init
%bcond_without compat %bcond_without compat
%bcond_without livestatus %bcond_without livestatus
...@@ -372,11 +363,16 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON" ...@@ -372,11 +363,16 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON"
%else %else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=OFF" CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=OFF"
%endif %endif
%if %{with lto_build}
# Disable LTO build for older compiler versions
# 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" CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=ON"
%else %else # suse_version 1315
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=OFF" CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=OFF"
%endif %endif # suse_version 1315
%if %{with systemd_and_init} %if %{with systemd_and_init}
CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON" CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON"
%else %else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment