mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
contrib/rpm: enable LTO by default on Fedora 33
With Fedora 33, LTO will be enabled by default via CFLAGS in redhat-rpm-config ([1]). That basically sets "CFLAGS=-flto -ffat-lto-objects". Note that we have our own configure/meson option to enable LTO. With "--with-lto" we set CFLAGS="-flto -flto-partition=none". This is necessary due ([2], [3]). So, disable Fedora's automatism, but turn on the suitable configure option to get working LTO. [1]5baaf4a99c
?branch=master [2]e6cf4213a7
('build: fix building with LTO') [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200#c28
This commit is contained in:
parent
407a1f1e98
commit
839ba57c7f
|
@ -59,7 +59,11 @@
|
|||
%bcond_without regen_docs
|
||||
%bcond_with debug
|
||||
%bcond_with test
|
||||
%if 0%{?fedora} >= 33
|
||||
%bcond_without lto
|
||||
%else
|
||||
%bcond_with lto
|
||||
%endif
|
||||
%bcond_with sanitizer
|
||||
%if 0%{?fedora}
|
||||
%bcond_without connectivity_fedora
|
||||
|
@ -134,6 +138,11 @@
|
|||
%global ebpf_enabled "no"
|
||||
%endif
|
||||
|
||||
# Fedora 33 enables LTO by default by setting CFLAGS="-flto -ffat-lto-objects".
|
||||
# However, we also require "-flto -flto-partition=none", so disable Fedora's
|
||||
# default and use our configure option --with-lto instead.
|
||||
%define _lto_cflags %{nil}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Name: NetworkManager
|
||||
|
|
Loading…
Reference in a new issue