[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 Sat, 30 Oct 2021 05:34:57 +0000
with message-id <E1mgh17-000280-OS@fasolo.debian.org>
and subject line Bug#985867: fixed in libreoffice 1:7.3.0~alpha1-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.3.0~alpha1-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: Fri, 29 Oct 2021 20:05:00 +0200
Source: libreoffice
Architecture: source
Version: 1:7.3.0~alpha1-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.3.0~alpha1-1) experimental; urgency=medium
 .
   * New upstream alpha release
     - fixes --enable-lto build with clang (filters out -flto=X)
       (closes: #985867)
 .
   * debian/patches/filter-out-lto-flags.diff: remove, was incomplete since
     the revert in 1:7.2.1-1 anyway
 .
   * debian/rules:
     - use --with-idlc-cpp=cpp to use cpp instead of ucpp and
       adapt IDLC_CPP_DEPENDS for -dev accordingly
     - build with LTO if we build with mergelibs
     - only test the apparmor profiles' syntax on build-indep builds
       (since that is where they are installed); move (dh-)apparmor build-deps
       to Build-Depends-Indep
   * debian/tests/* debian/rules::
     - run the cppunit tests (as superficial tests) and add
       a test for manually running CppunitTest_connectivity_mysql_test after
       preparing mariadb (also superficial)
     - run the smoketest again now that we have a needs-build test anyway and
       don't add a hacked smoketestdoc.sxw anymore into smoketest-data - use the
       the just-built one
   * debian/rules, debian/control.in, debian/joinctrl.py: add new
     Build-Depends-Arch: containing the nocheck build-deps needed for make check
     on arch-dep builds
   * debian/watch: watch alphas/betas
Checksums-Sha1:
 8d0b8d77431e932d583e9ba42d35699251c1b242 30701 libreoffice_7.3.0~alpha1-1.dsc
 8deda058a50ac5b8caaf42b0209223bc456c6d4e 111332188 libreoffice_7.3.0~alpha1.orig-helpcontent2.tar.xz
 6e91e12072fb2a8488edf0672dd9a265891a115a 194765452 libreoffice_7.3.0~alpha1.orig-translations.tar.xz
 ccd1b91b97a5bc27431557e4f528226a189f6009 253695132 libreoffice_7.3.0~alpha1.orig.tar.xz
 e8b14b919229d5c514f39f34bb042e79f627747b 833 libreoffice_7.3.0~alpha1.orig.tar.xz.asc
 fe99a4656b732787f577e1123172da67a75a54a7 27249676 libreoffice_7.3.0~alpha1-1.debian.tar.xz
 59b1aa335c21794019952ee7713189833f5ec52f 32840 libreoffice_7.3.0~alpha1-1_source.buildinfo
Checksums-Sha256:
 e7b553012482c4f4d4c2e05e80fb1cb10c57a011ca7edbd0ce681d6118c35826 30701 libreoffice_7.3.0~alpha1-1.dsc
 d102910536ddba14e1b58874b8c87a1ce6073f7471312c048958b41e676123d2 111332188 libreoffice_7.3.0~alpha1.orig-helpcontent2.tar.xz
 0242d2c1165d299eceee2558767b6c4aabdec5cd919799ca50ba15e49fe1b323 194765452 libreoffice_7.3.0~alpha1.orig-translations.tar.xz
 bc2d30da33420f8bd73850ccbbc93da72add514a59649677bb4e7e2be698d3a0 253695132 libreoffice_7.3.0~alpha1.orig.tar.xz
 4816fd1da03edc7da18d3fa26ebbcda84e4bf8069ed8881569c751bb47de9695 833 libreoffice_7.3.0~alpha1.orig.tar.xz.asc
 133c706fb21a521fdf8934a4444be01a03d25f1839667cfa7d95626fa1dfc95b 27249676 libreoffice_7.3.0~alpha1-1.debian.tar.xz
 4fca758ac0be52b4206a3a610f4975835ca6330af3312cf315e9d8ad01f3b251 32840 libreoffice_7.3.0~alpha1-1_source.buildinfo
Files:
 ef6edc02873b17f80bc716d955cb1c00 30701 editors optional libreoffice_7.3.0~alpha1-1.dsc
 4531e3000b1911fc0ed81d44d0d033ae 111332188 editors optional libreoffice_7.3.0~alpha1.orig-helpcontent2.tar.xz
 7edf5acf14f6637cf5fd20e3291ddcb2 194765452 editors optional libreoffice_7.3.0~alpha1.orig-translations.tar.xz
 8a7d4d8f342911a9aea9ba00aee95fdd 253695132 editors optional libreoffice_7.3.0~alpha1.orig.tar.xz
 0d998f27c05842429e0f81346b32fd27 833 editors optional libreoffice_7.3.0~alpha1.orig.tar.xz.asc
 5dbbbab8431287ebadea3369141569ae 27249676 editors optional libreoffice_7.3.0~alpha1-1.debian.tar.xz
 855bad1027033117a75c5e8d9dc1f14e 32840 editors optional libreoffice_7.3.0~alpha1-1_source.buildinfo

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

iQJEBAEBCgAuFiEE4S3qRnUGcM+pYIAdCqBFcdA+PnAFAmF81DsQHHJlbmVAZGVi
aWFuLm9yZwAKCRAKoEVx0D4+cK2YD/9VywAApzPuOfrbskSmFStRZ10Xl1aiVffd
zqunzku3MTNpPVS/cof5K2ibCafX5chdhqRpjgZvTueVEPzKQyjxDH4kQW6/mzgQ
ppOnJHLuEWu37i+GjefEJgk2WRzM6xL1kXlDJE1sr2zXfO7YWRTtXvzb1TT3rXet
C6Aii/qwCqgHMbsBU1KUKf7CpE42IJs2c+xU/ho05lX1sEv8C0BDvCxgqgRdPetw
ZmBAKQuKUvqnMNygYlxakpPXDb6PZ7lhAxLIsimTL4Fpau4u8nH+wvWuwkz8zYK/
B5AseY+vdVuRq8AKZeKNiqRKhT19qu53UJeoFom6vHSnvSaPmNFnWdpXHtku9ihG
kFprj/Tf3j/vgOCxOiYmPOqGl4c7eq5ca9duXWzw6plh7CYzrc1gWkenO3A8XXyc
SVNEeBrVx0LfXm5ZyFKNtFqEFpAOWkA8+l1+v6hOf+Bz3sHLF2x9J1hi4b2IaTfW
KrdDDMoAMAksmEVTTD67q5qg8hVbO4vidKFGcab1Aentu+YrfYqPEJRsnbEB+Cdq
dbpJfsz/DELEjImGl1Etrw8FJayZZgp65DNypMCMS2p/RaRmf2ocK4tCobHHSW7l
atzWt0MIZb4jhPWyWzqxtkZA5uD9rP//4idQjKixnBSaxqPzKuj6LUdOg3i4Mjkc
bZbqofXyOw==
=1L4I
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: