diff --git a/0001-Pass-fno-lto-unconditionally.patch b/0001-Pass-fno-lto-unconditionally.patch new file mode 100644 index 0000000..0ee44bd --- /dev/null +++ b/0001-Pass-fno-lto-unconditionally.patch @@ -0,0 +1,57 @@ +From 7b0ab85b4042cb38221ca5c9794b70c87443181f Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Thu, 20 Aug 2020 14:54:31 +0200 +Subject: [PATCH] Pass -fno-lto unconditionally + +At least when building the libreoffice rpm on Fedora 33, the relevant -flto... +flags are passed in via the global CFLAGS/CXXFLAGS, and no --enable-lto +configure option is given. That caused this library to be built with LTO there, +which in turn caused at least aarch64 to fail the %check step 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! testtools/source/bridgetest/bridgetest.cxx:1176 +> +> > error: error: test failed! testtools/source/bridgetest/bridgetest.cxx:1176 +> > dying...make[1]: *** [testtools/CustomTarget_uno_test.mk:25: workdir/CustomTarget/testtools/uno_test.done] Error 1 +> make: *** [Makefile:166: CustomTarget_testtools/uno_test] Error 2 + +The easiest fix appears to pass -fno-lto unconditionally: For one, both GCC and +Clang appear to support it since before our baseline versions (GCC: baseline +7.0.0, presumably supported since "Merge lto branch into trunk" in +releases/gcc-4.5; Clang: baseline 5.0.2 (at least on Linux), presumably +supported since "Driver: Support -fno-lto" in +releases/3.0.x). For another, the other (few) places in the code that check +ENABLE_LTO appear not to be relevant at least for that Fedora 33 rpm build, so +there appears to be no incentive to make that build configure --enable-lto as an +alternative to this fix. + +Change-Id: I4735403660e57ef73b99d6a8cc5945c6d8e2af73 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101129 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + bridges/Library_cpp_uno.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk +index 5e78bcb676a6..0c6b255f52ad 100644 +--- a/bridges/Library_cpp_uno.mk ++++ b/bridges/Library_cpp_uno.mk +@@ -212,7 +212,7 @@ $(eval $(call gb_Library_add_cxxflags,gcc3_uno,\ + $(if $(filter armeabi-v7a,$(ANDROID_APP_ABI)),-I$(ANDROID_BINUTILS_PREBUILT_ROOT)/lib/gcc/arm-linux-androideabi/4.9.x/include) \ + -fno-omit-frame-pointer \ + -fno-strict-aliasing \ +- $(if $(filter TRUE,$(ENABLE_LTO)),-fno-lto) \ ++ -fno-lto \ + $(if $(filter TRUE,$(HAVE_GCC_AVX)),-mno-avx) \ + )) + +-- +2.26.2 + diff --git a/libreoffice.spec b/libreoffice.spec index 5c9a4ab..70ce04d 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -50,7 +50,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.1 -Release: 1%{?libo_prerelease}%{?dist} +Release: 2%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -241,6 +241,7 @@ Patch1: 0001-disble-tip-of-the-day-dialog-by-default.patch Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch # backported Patch3: 0001-fix-detecting-qrcodegen.patch +Patch4: 0001-Pass-fno-lto-unconditionally.patch %if 0%{?rhel} # not upstreamed @@ -2221,6 +2222,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Fri Aug 21 2020 Stephan Bergmann 7.0.1.1-2 +- Build the binary UNO bridge with -fno-lto + * Thu Aug 20 2020 Thierry Vignaud 7.0.1.1-1 - 7.0.1 RC1