Enable LTO by default

This commit is contained in:
Jeff Law 2020-07-21 21:38:41 -06:00
parent 5f32aac09e
commit 5baaf4a99c
2 changed files with 15 additions and 2 deletions

12
macros
View File

@ -320,7 +320,17 @@ print(result)
%_ld_as_needed 1 %_ld_as_needed 1
%_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed} %_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed}
%_general_options -O2 -fexceptions -g -grecord-gcc-switches -pipe # LTO is the default in Fedora.
# "%define _lto_cflags %{nil}" to opt out
#
# We currently have -ffat-lto-objects turned on out of an abundance of
# caution. To remove it we need to do a check of the installed .o/.a files
# to verify they have real sections/symbols after LTO stripping. That
# way we can detect installing an unusable .o/.a file. This is on the TODO
# list for F34.
%_lto_cflags -flto -ffat-lto-objects
%_general_options -O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe
%_warning_options -Wall -Werror=format-security %_warning_options -Wall -Werror=format-security
%_preprocessor_defines -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS %_preprocessor_defines -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config Name: redhat-rpm-config
Version: 162 Version: 163
Release: 1%{?dist} Release: 1%{?dist}
# No version specified. # No version specified.
License: GPL+ License: GPL+
@ -211,6 +211,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
%{_rpmconfigdir}/macros.d/macros.kmp %{_rpmconfigdir}/macros.d/macros.kmp
%changelog %changelog
* Tue Jul 21 2020 Jeff Law <law@redhat.com> - 163-1
- Enable LTO by default
* Thu Jul 16 2020 Lumír Balhar <lbalhar@redhat.com> - 162-1 * Thu Jul 16 2020 Lumír Balhar <lbalhar@redhat.com> - 162-1
- New script brp-fix-pyc-reproducibility - New script brp-fix-pyc-reproducibility