From 460cd090d938bf0d35ba75d6e74696a79fe39b45 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 12 Aug 2020 11:55:48 +0200 Subject: [PATCH] Re-enable tests in %check Upstream "rework the default make target" towards libreoffice-7-0 had dropped the unitcheck and slowcheck targets from the default target. But after the preceding b27571d6882b8436db9d5284a876b54569ea7a32 "Enable LTO again", that reveals that there appears to still be issues with LTO at least on i686, which fails with > ### unexpected exception content! failed > ### unexpected exception content! failed > ### unexpected exception content! failed > exception test failed > oneway exception test failed > exception occurred: error: test failed! /builddir/build/BUILD/libreoffice-7.0.0.3/testtools/source/bridgetest/bridgetest.cxx:1176 > > error: error: test failed! /builddir/build/BUILD/libreoffice-7.0.0.3/testtools/source/bridgetest/bridgetest.cxx:1176 > > dying...make[1]: *** [/builddir/build/BUILD/libreoffice-7.0.0.3/testtools/CustomTarget_uno_test.mk:25: /builddir/build/BUILD/libreoffice-7.0.0.3/workdir/CustomTarget/testtools/uno_test.done] Error 1 (), so keep LTO disabled there until the issue is addressed. Note that for aarch64, armv7hl, and s390x %check is currently no-op, so it is not obvious from just building the package whether or not they will have issues with LTO at runtime. But at least for ppc64le and x86_64 the (non--no-op) %check has been seen to succeed with LTO enabled, including the CppunitTest_sw_apitests for which LTO had originally been disabled for LO 6.4 in 5d644f1606b76ffa4a102433849a824d7293a404 "%check fails with lto enabled" (see ). --- libreoffice.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index 0ea2d85..4bbb037 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -999,6 +999,12 @@ mv .git .git-rpm # path to external tarballs EXTSRCDIR=`dirname %{SOURCE0}` +# On i686, CustomTarget_testtools/uno_test from the testsuite fails when LTO is +# enabled: +%ifarch i686 +%define _lto_cflags %{nil} +%endif + #use the RPM_OPT_FLAGS but remove the LibreOffice overridden ones for i in $RPM_OPT_FLAGS; do case "$i" in @@ -1469,7 +1475,7 @@ done %check %ifnarch ppc64 s390x aarch64 armv7hl -make +make unitcheck slowcheck # we don't need this anymore rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %endif