Bug#888543: webkit2gtk: Please reduce optimization level to -O1 on sh3 and sh4

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Fri Jan 26 22:04:44 UTC 2018


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

Hi!

webkit2gtk currently FTBFS on sh3/sh4 due to an upstream gcc bug [1]:

/<<PKGBUILDDIR>>/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:273:1: error: unable to find a register to spill in class 'R0_REGS'
 }
 ^
/<<PKGBUILDDIR>>/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:273:1: error: this is the insn:
(insn 664 663 669 66 (parallel [
            (set (subreg:SI (reg:QI 605) 0)
                (unspec_volatile:SI [
                        (mem/v:QI (reg/f:SI 6 r6 [orig:706 _169 ] [706]) [-1  S1 A8])
                        (reg:QI 5 r5 [598])
                        (subreg:QI (reg:SI 604) 0)
                    ] UNSPECV_CMPXCHG_1))
            (set (mem/v:QI (reg/f:SI 6 r6 [orig:706 _169 ] [706]) [-1  S1 A8])
                (unspec_volatile:QI [
                        (const_int 0 [0])
                    ] UNSPECV_CMPXCHG_2))
            (set (reg:SI 147 t)
                (unspec_volatile:SI [
                        (const_int 0 [0])
                    ] UNSPECV_CMPXCHG_3))
            (clobber (scratch:SI))
            (clobber (reg:SI 0 r0))
            (clobber (reg:SI 1 r1))
        ]) "/usr/include/c++/7/bits/atomic_base.h":434 403 {atomic_compare_and_swapqi_soft_gusa}
     (expr_list:REG_DEAD (reg:SI 604)
        (expr_list:REG_DEAD (reg:QI 5 r5 [598])
            (expr_list:REG_UNUSED (reg:QI 605)
                (expr_list:REG_UNUSED (reg:SI 1 r1)
                    (expr_list:REG_UNUSED (reg:SI 0 r0)
                        (nil)))))))
/<<PKGBUILDDIR>>/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:273: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccoGxdST.out file, please attach this to your bugreport.

While the upstream bug has not been fixed yet, it can be worked around by reducing
the optimization level on sh3/sh4 to -O1 which is what the attached patch does.

Would be nice if it could be applied for the next upload of webkit2gtk.

Thanks,
Adrian

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426
> [2] https://buildd.debian.org/status/fetch.php?pkg=webkit2gtk&arch=sh4&ver=2.18.6-1&stamp=1516855725&raw=0

--
 .''`.  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 --------------
diff -Nru old/webkit2gtk-2.18.6/debian/rules new/webkit2gtk-2.18.6/debian/rules
--- old/webkit2gtk-2.18.6/debian/rules	2018-01-24 12:30:06.000000000 +0100
+++ new/webkit2gtk-2.18.6/debian/rules	2018-01-26 22:57:39.257606655 +0100
@@ -25,6 +25,12 @@
 	CFLAGS := $(CFLAGS:-g=-g1)
 endif
 
+# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426
+ifneq (,$(filter $(DEB_HOST_ARCH),sh3 sh4))
+        CFLAGS := $(CFLAGS:-O2=-O1)
+        CXXFLAGS := $(CXXFLAGS:-O2=-O1)
+endif
+
 ifeq (,$(filter $(DEB_HOST_ARCH),i386 amd64 hurd-i386 kfreebsd-i386 kfreebsd-amd64 armhf arm64))
 	EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF
 endif


More information about the Pkg-webkit-maintainers mailing list