Bug#952482: webkit2gtk: Please pass -mlra and -fno-move-loop-invariants on sh4

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Mon Feb 24 22:11:23 GMT 2020


Source: webkit2gtk
Version: 2.26.4-1
Severity: normal
Tags: patch
User: debian-superh at lists.debian.org
Usertags: sh4

Hi!

In order for webkit2gtk to build on sh4, it's necessary to enable the
new register allocator on sh4 (LRA), see [1, 2].

Also, there is a regression in gcc-9 and gcc-10 that needs one optimization
to be disabled as otherwise the compiler will crash with an internal
compiler error (ICE) [3].

Please apply the attached patch for the next upload.

Thanks,
Adrian

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
> [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93876
> [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93877

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
-------------- next part --------------
--- webkit2gtk-2.26.4/debian/rules.orig	2020-02-14 14:55:40.000000000 +0100
+++ webkit2gtk-2.26.4/debian/rules	2020-02-24 23:06:26.482766937 +0100
@@ -37,6 +37,14 @@
 	EXTRA_CMAKE_ARGUMENTS += -DUSE_LD_GOLD=OFF
 endif
 
+# Enable the new register allocator on SH and
+# disable one particular optimization flag
+# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93876
+# and: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93877
+ifneq (,$(filter $(DEB_HOST_ARCH),sh3 sh4))
+        CPPFLAGS += -mlra -fno-move-loop-invariants
+endif
+
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 	EXTRA_CMAKE_ARGUMENTS += -DUSE_SYSTEM_MALLOC=ON
 	CPPFLAGS += -DRELEASE_WITHOUT_OPTIMIZATIONS


More information about the Pkg-webkit-maintainers mailing list