Enable LTO

This commit is contained in:
František Zatloukal 2019-07-10 09:45:50 +02:00
parent cb01018c75
commit 5395cffee2
1 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,9 @@
%global major 60
# Enable LTO
%global optflags %{optflags} -flto
%global build_ldflags %{build_ldflags} -flto
# Require libatomic for ppc
%ifarch ppc
%global system_libatomic 1
@ -12,7 +16,7 @@
Name: mozjs%{major}
Version: 60.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: SpiderMonkey JavaScript library
License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0
@ -104,6 +108,11 @@ popd
rm -rf ../../modules/zlib
%build
# Enable LTO
export AR=%{_bindir}/gcc-ar
export RANLIB=%{_bindir}/gcc-ranlib
export NM=%{_bindir}/gcc-nm
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
@ -181,6 +190,9 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
%{_includedir}/mozjs-%{major}/
%changelog
* Wed Jul 10 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 60.8.0-2
- Enable LTO
* Tue Jul 09 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.8.0-1
- Update to 60.8.0