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

2020-02-26 Thread Alberto Garcia
On Wed, Feb 26, 2020 at 02:50:06PM +0100, John Paul Adrian Glaubitz wrote:

> > Thanks, patch applied.
> 
> It won't help, unfortunately. Because there is one other source file
> where the removed optimization won't help. The mlra is necessary in
> any case and I'm about to switch GCC on sh4 to use LRA by default
> now.

I'm not sure if I follow... shall I keep the patch in webkit then?

Berto



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

2020-02-26 Thread John Paul Adrian Glaubitz
On 2/26/20 2:40 PM, Alberto Garcia wrote:
> Thanks, patch applied.

It won't help, unfortunately. Because there is one other source file where
the removed optimization won't help. The mlra is necessary in any case and
I'm about to switch GCC on sh4 to use LRA by default now.

> The sh4 build is currently failing because of this however:
> 
>   Running
> 
>'/usr/bin/ninja' '--version'
> 
>   failed with:
> 
>Process terminated due to timeout
> 
> But this has nothing to do with this patch, right?

Yes, this is completely unrelated and just an artifact which can be ignored.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



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

2020-02-26 Thread Alberto Garcia
Control: tags -1 pending

On Mon, Feb 24, 2020 at 11:11:23PM +0100, John Paul Adrian Glaubitz wrote:
> Source: webkit2gtk
> Version: 2.26.4-1
> Severity: normal
> Tags: patch
> User: debian-sup...@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].

Thanks, patch applied.

The sh4 build is currently failing because of this however:

  Running

   '/usr/bin/ninja' '--version'

  failed with:

   Process terminated due to timeout

But this has nothing to do with this patch, right?

Berto



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

2020-02-24 Thread John Paul Adrian Glaubitz
Source: webkit2gtk
Version: 2.26.4-1
Severity: normal
Tags: patch
User: debian-sup...@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 - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- webkit2gtk-2.26.4/debian/rules.orig 2020-02-14 14:55:40.0 +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