- Do not enable LTO on older codestreams, too old toolchain

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=646
This commit is contained in:
Tomáš Chvátal 2018-04-17 09:27:24 +00:00 committed by Git OBS Bridge
parent 9a1cfafc13
commit ed7c0937d2
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Apr 17 09:26:37 UTC 2018 - tchvatal@suse.com
- Do not enable LTO on older codestreams, too old toolchain
-------------------------------------------------------------------
Fri Apr 13 10:49:46 UTC 2018 - tchvatal@suse.com

View File

@ -24,6 +24,12 @@
%define external_url http://dev-www.libreoffice.org/src/
%define tarball_url http://download.documentfoundation.org/libreoffice/src/6.0.3
#%define tarball_url http://dev-builds.libreoffice.org/pre-releases/src/
# LTO needs newer toolchain stack only
%if 0%{?suse_version} >= 1500
%bcond_without lto
%else
%bcond_with lto
%endif
# Enable the kde integration on openSUSE only
%if 0%{?is_opensuse}
%bcond_without kdeintegration
@ -929,9 +935,13 @@ echo "HTML_TIMESTAMP = NO" >> odk/docs/idl/Doxyfile
source %{_sysconfdir}/profile.d/alljava.sh
# use RPM_OPT_FLAGS, ...
# remove big debugsymbols as we simply consume too much space
%if %{with lto}
ARCH_FLAGS="`echo %{optflags} -flifetime-dse=1 | sed -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'`"
CFLAGS="$ARCH_FLAGS -flifetime-dse=1"
CXXFLAGS="$ARCH_FLAGS -flifetime-dse=1"
%else
ARCH_FLAGS="`echo %{optflags} | sed -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'`"
%endif
CFLAGS="$ARCH_FLAGS"
CXXFLAGS="$ARCH_FLAGS"
export ARCH_FLAGS CFLAGS CXXFLAGS
# Colada does not have .pc file and configure creator was really lazy
@ -951,7 +961,9 @@ export NOCONFIGURE=yes
%configure \
--with-parallelism=%{jobs} \
--enable-eot \
%if %{with lto}
--enable-lto \
%endif
--enable-mergelibs \
--docdir=%{_docdir}/%{name} \
--with-compat-oowrappers \