mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 05:50:06 +01:00
build: remove -flto-partition=none
As reported in https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1714, it was added to workaround a bug in GCC. That bug was fixed long ago thus this option is no longer needed. Moreover, it increases the memory usage during the build and we are geting some failures when building in ppc64 systems that we suspect are due to memory exhaustion. Fixes https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1714
This commit is contained in:
parent
c627bbea4c
commit
35b76b7ca7
2 changed files with 4 additions and 17 deletions
|
|
@ -164,11 +164,6 @@
|
|||
%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
|
||||
|
|
|
|||
10
meson.build
10
meson.build
|
|
@ -172,19 +172,11 @@ if enable_ld_gc
|
|||
endif
|
||||
|
||||
enable_lto = get_option('b_lto')
|
||||
if enable_lto
|
||||
if cc.get_id() == 'clang'
|
||||
if enable_lto and cc.get_id() == 'clang'
|
||||
clang_version = cc.version()
|
||||
if clang_version <= '18.0.0'
|
||||
error('Clang version should be greater then 18.0.0 got : ' + clang_version)
|
||||
endif
|
||||
else
|
||||
# Meson already adds '-flto'
|
||||
lto_flag = '-flto-partition=none'
|
||||
assert(cc.has_argument(lto_flag), '-flto-partition=none not supported. Disable link-time optimization with -Db_lto=false.')
|
||||
common_flags += lto_flag
|
||||
common_ldflags += lto_flag
|
||||
endif
|
||||
endif
|
||||
|
||||
common_flags += cc.get_supported_arguments([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue