Force -ffat-lto-objects and re-enable LTO

This commit is contained in:
Jeff Law 2020-08-31 12:53:00 -06:00
parent 37dd5029d6
commit e0e5bb3843

View File

@ -3,7 +3,7 @@
Name: mpdecimal
Version: 2.5.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Library for general decimal arithmetic
License: BSD
@ -50,11 +50,10 @@ The package contains documentation for the mpdecimal library.
unzip -d tests/testdata %{SOURCE1}
%build
# configure tests try to compile code containing ASMs to a .o file
# In an LTO world, that always works as compilation does not happen until
# link time. As a result we get the wrong results from configure.
# Disable LTO.
%define _lto_cflags %{nil}
# Force -ffat-lto-objects so that configure tests are assembled which
# is required for ASM configure tests. -ffat-lto-objects is the default
# for F33, but will not be the default in F34
#define _lto_cflags -flto=auto -ffat-lto-objects
%configure
make %{?_smp_mflags}
@ -93,6 +92,9 @@ fi
%ldconfig_scriptlets
%changelog
* Mon Aug 31 2020 Jeff Law <law@redhat.com> - 2.5.0-3
- Force -ffat-lto-objects and re-enable LTO
* Thu Aug 6 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 2.5.0-2
- Re-enabled tests