[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#985867: marked as done (filter out GCC's lto flags for the skia build)



Your message dated Thu, 25 Mar 2021 21:04:47 +0000
with message-id <E1lPX9r-00051f-3O@fasolo.debian.org>
and subject line Bug#985867: fixed in libreoffice 1:7.1.2~rc2-1
has caused the Debian Bug report #985867,
regarding filter out GCC's lto flags for the skia build
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
985867: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985867
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src:libreoffice
Version: 1:7.1.2~rc1-1
Tags: patch

When building LO with lto turned on (https://wiki.debian.org/ToolChain/LTO),
the build fails, because one module (skia) is still built with clang, apparently
for performance reasons. I didn't check if that's still needed for recent
compiler versions.

So just don't use the lto flags when building the skia module. The build system
already has a macro for that for cflags (gb_FilterOutClangCFLAGS), but is
lacking one for ldflags, and these targets seem to be autogenerated. I didn't
look into filtering this, and provided a wrapper for clang/clang++ instead.

Unsure if the change to gb_LTOFLAGS is really needed. The build is doing ok
without explicitly configuring with --enable-lto.  Passing -fuse-linker-plugin
explicitly isn't needed since GCC 8, and I didn't see any rationale to set the
optimizations explicitly.

Matthias


  * Fix lto build, avoiding to pass lto flags to the skia build.

diff -Nru libreoffice-7.1.2~rc1/debian/clang_wrapper libreoffice-7.1.2~rc1/debian/clang_wrapper
--- libreoffice-7.1.2~rc1/debian/clang_wrapper	1970-01-01 00:00:00.000000000 +0000
+++ libreoffice-7.1.2~rc1/debian/clang_wrapper	2021-03-25 07:17:38.000000000 +0000
@@ -0,0 +1,18 @@
+#! /usr/bin/python3
+
+import os
+import sys
+
+prog = os.path.join("/usr/bin", os.path.basename(sys.argv[0]))
+new_argv = []
+
+for arg in sys.argv[1:]:
+    if arg.startswith("-flto=") or arg == "-ffat-lto-objects":
+        continue
+    new_argv.append(arg)
+
+try:
+    os.execv(prog, new_argv)
+except FileNotFoundError:
+    print("unable to execute:", prog, new_argv)
+    sys.exit(1)
diff -Nru libreoffice-7.1.2~rc1/debian/patches/filter-out-lto-flags.diff libreoffice-7.1.2~rc1/debian/patches/filter-out-lto-flags.diff
--- libreoffice-7.1.2~rc1/debian/patches/filter-out-lto-flags.diff	1970-01-01 00:00:00.000000000 +0000
+++ libreoffice-7.1.2~rc1/debian/patches/filter-out-lto-flags.diff	2021-03-24 14:03:44.000000000 +0000
@@ -0,0 +1,16 @@
+--- a/solenv/gbuild/platform/com_GCC_defs.mk
++++ b/solenv/gbuild/platform/com_GCC_defs.mk
+@@ -180,10 +180,12 @@ gb_LTOFLAGS := -flto
+ gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
+ endif
+ else
+-gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) -fuse-linker-plugin -O2
++gb_LTOFLAGS := -flto=auto -ffat-lto-objects
+ endif
+ endif
+ 
++gb_FilterOutClangCFLAGS += -flto=auto -ffat-lto-objects
++
+ gb_LinkTarget_EXCEPTIONFLAGS := \
+ 	-DEXCEPTIONS_ON \
+ 	-fexceptions
diff -Nru libreoffice-7.1.2~rc1/debian/patches/series libreoffice-7.1.2~rc1/debian/patches/series
--- libreoffice-7.1.2~rc1/debian/patches/series	2021-03-12 09:31:16.000000000 +0000
+++ libreoffice-7.1.2~rc1/debian/patches/series	2021-03-24 13:59:07.000000000 +0000
@@ -52,3 +52,4 @@
 replace-source-sans-in-templates.diff
 add-yaru-theme.diff
 yaru-ubuntu-default.diff
+filter-out-lto-flags.diff
diff -Nru libreoffice-7.1.2~rc1/debian/rules libreoffice-7.1.2~rc1/debian/rules
--- libreoffice-7.1.2~rc1/debian/rules	2021-03-12 09:31:16.000000000 +0000
+++ libreoffice-7.1.2~rc1/debian/rules	2021-03-25 07:17:38.000000000 +0000
@@ -1932,6 +1932,17 @@
 	bin/update_pch.sh
 endif
 
+	# setup clang wrappers
+	mkdir -p debian/usr/bin
+	cp debian/clang_wrapper debian/usr/bin/clang
+	cp debian/clang_wrapper debian/usr/bin/clang++
+ifneq (,$(CLANG_VERSION))
+  ifneq ($(CLANG_VERSION),default)
+	cp debian/clang_wrapper debian/usr/bin/clang-$(CLANG_VERSION)
+	cp debian/clang_wrapper debian/usr/bin/clang++-$(CLANG_VERSION)
+  endif
+endif
+
 	# Ubuntu yaru icon theme links
 	ln -srf yaru/build/png icon-themes/yaru
 	ln -srf yaru/build/svg icon-themes/yaru_svg

--- End Message ---
--- Begin Message ---
Source: libreoffice
Source-Version: 1:7.1.2~rc2-1
Done: Rene Engelhard <rene@debian.org>

We believe that the bug you reported is fixed in the latest version of
libreoffice, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 985867@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Rene Engelhard <rene@debian.org> (supplier of updated libreoffice package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 25 Mar 2021 20:56:22 +0100
Source: libreoffice
Architecture: source
Version: 1:7.1.2~rc2-1
Distribution: experimental
Urgency: medium
Maintainer: Debian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Changed-By: Rene Engelhard <rene@debian.org>
Closes: 985867
Changes:
 libreoffice (1:7.1.2~rc2-1) experimental; urgency=medium
 .
   * New upstream release candidate
 .
   * debian/patches/filter-out-lto-flags.diff: as name says, filter out LTO
     flags for clang-built skia, thanks Matthias Klose
   * debian/rules, debian/clang-wrapper: add clang wrapper for above, thanks
     Matthias Klose
   (closes: #985867)
 .
   * debian/control.ure.in:
     - stop recommending liblibreoffice-java and a JDK in ure; ure-java
       is supposed to do it does it already
Checksums-Sha1:
 40a3af42477684a4ec8df529483fec1471fb7666 30702 libreoffice_7.1.2~rc2-1.dsc
 a018629fa30119844533709f85a46f05c2c23c5a 111104204 libreoffice_7.1.2~rc2.orig-helpcontent2.tar.xz
 dd89214c9d5961bc4d0d4b4549340ff721899b71 185916512 libreoffice_7.1.2~rc2.orig-translations.tar.xz
 5ddcbdbdf158fe5362571b0d02076cff98d0ab3b 243806936 libreoffice_7.1.2~rc2.orig.tar.xz
 8345f1f845017d45a426259270f592b2c9a40eba 833 libreoffice_7.1.2~rc2.orig.tar.xz.asc
 86fc6db9c2b5097b1c924b01f4ae7c754e42c367 21514116 libreoffice_7.1.2~rc2-1.debian.tar.xz
 31600bf0b489d5e517b21f9581f9997bfd46801f 33595 libreoffice_7.1.2~rc2-1_source.buildinfo
Checksums-Sha256:
 cba139e22d8d983659edd29d987521bc6a91224c9900bfbb60b430bc7f5a5446 30702 libreoffice_7.1.2~rc2-1.dsc
 2099f5c4f1d8e3bd006fa3c45ca685969a87e1d02711c473e31243a7dafed423 111104204 libreoffice_7.1.2~rc2.orig-helpcontent2.tar.xz
 c8fd0717b25b92ffbce1f375a0deb12afc79e2aa6629770b3b50541a4816bd34 185916512 libreoffice_7.1.2~rc2.orig-translations.tar.xz
 6ba58991f626dc42c75ca2c28f91915ffabae18ba5a5fba5344ed7004eba29f8 243806936 libreoffice_7.1.2~rc2.orig.tar.xz
 929ce8c0bb03305888c1d4b815c498c00c634e4c398c0da4efab0013113e643e 833 libreoffice_7.1.2~rc2.orig.tar.xz.asc
 45dad89443addd9cd42a153a4ed6cda24e2c6a18db64412682531d07e1826813 21514116 libreoffice_7.1.2~rc2-1.debian.tar.xz
 5782e3b131de2c5280489b4bd75e77bf8a4477f2f5c37501a701ac42e3bbd2b9 33595 libreoffice_7.1.2~rc2-1_source.buildinfo
Files:
 6818d07247e70160a23c773c729396cd 30702 editors optional libreoffice_7.1.2~rc2-1.dsc
 c40a6eaba3e0022d767ddd7c8e634838 111104204 editors optional libreoffice_7.1.2~rc2.orig-helpcontent2.tar.xz
 3a3acf86751a50c36651b11d70f943b4 185916512 editors optional libreoffice_7.1.2~rc2.orig-translations.tar.xz
 60af85a8960ef2bc0f70880e589dc12c 243806936 editors optional libreoffice_7.1.2~rc2.orig.tar.xz
 3e4f28819c2018692f7867ac72531286 833 editors optional libreoffice_7.1.2~rc2.orig.tar.xz.asc
 1137a52cb480a2337b56e47d995093b3 21514116 editors optional libreoffice_7.1.2~rc2-1.debian.tar.xz
 acf36fd9ac8e9d1d554a2cab45b7f1e3 33595 editors optional libreoffice_7.1.2~rc2-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE4S3qRnUGcM+pYIAdCqBFcdA+PnAFAmBc9UgQHHJlbmVAZGVi
aWFuLm9yZwAKCRAKoEVx0D4+cNQ2EACSNlhmfLHIYNT1ydToTq0aH7ODy+jqCcWj
vgoK2aRkEwPiGxM6Frj6AUIhKa/s9wrsI6CN+U6quGvCuNY5Zzf5gSrLfNheNnRm
YWBUAupJYJcoekuiUm7HYf9AINd7OsduZwLplKsANNzBB231kSKKelCh3AwtH62F
no6gFRvWB/NEFlqu4P6wTA2b1y3F8pqzX0Pnz3AL7ddJstFn3c4y5GfKf1nG9D8S
K5Lh4W/SY3lnX1H7o9gmiJQI7SD/iy9EZkykauLJ+JEER5Izv+yNlvtXKObmMveV
FZOiZYnDJcz1tydw1DWUBjmCKmfS3gidQ36tlD9xmXJX/f3bBMb2MYFUuR2AVdFB
Zlt0WdwEEzbH0cE2PcjQ3G+BT2Xvq3X7AC3Qnl7iUcJYcOdUtZpNDaayuXG6S/hc
SiQp1/IrA1IkMr6U27nPyhQlC8tHNe9mH8lqmkOioisqMrUtdn6I74sRFdN2ayJ5
KjNqg0+vEhrUHHSUtknb8KATMXyIgPJ49bBw2Bc9lA4Demiv3n9uGass1Q4wSvn2
oD6mi98yIcmBt9KdUzIIezf8YDlKAIF3nG/VDUv1ClPLkAhl0n7CEH8I7Ki8mjKZ
9+pd2b6JkgxhNuorTAWJj6vdw1j7tdv4G3MQQKBLa5KyfgIpG/auQxuLG7nmZE+u
XL5Qdt7eiA==
=esvf
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: