Source: qtwebkit Severity: normal Tags: patch User: debian-sp...@lists.debian.org Usertags: sparc64
Dear Maintainer, qtwebkit currently fails to build for sparc64. I was able to fix the build by adding sparc64 to the list of non-JIT archs in debian/rules, fixing a declaration of UChar32, and removing a condition disabling atomics on sparc64. Newer versions of gcc implement builtin atomic operations for all integer types. Below is the change to debian/rules and I've attached the patch that changes the two headers. The changes are simple and shouldn't affect other archs. Similar changes have already been made upstream in newer versions of webkit but they seem to implement an incompatible qt api. --- a/debian/rules 2015-09-15 08:05:20.000000000 -0500 +++ b/debian/rules 2015-12-01 10:18:33.501211135 -0600 @@ -50,7 +50,7 @@ #disable JIT assembler on archs where it doesn't compile #disable WTF_USE_3D_GRAPHICS on ARM where it doesn't compile #disable forcing SSE2 on all other platforms -ifneq (,$(filter arm64 armel hppa mips mipsel mips64 mips64el powerpc ppc64el s390x x32,$(DEB_HOST_ARCH))) +ifneq (,$(filter arm64 armel hppa mips mipsel mips64 mips64el powerpc ppc64el s390x sparc64 x32,$(DEB_HOST_ARCH))) ./Tools/Scripts/build-webkit --qt DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS) else ifeq ($(DEB_HOST_ARCH),armhf) ./Tools/Scripts/build-webkit --qt DEFINES+=WTF_USE_3D_GRAPHICS=0 DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS) -- System Information: Debian Release: stretch/sid APT prefers unreleased APT policy: (500, 'unreleased'), (500, 'unstable') Architecture: sparc64 Kernel: Linux 4.3.0-gentoo (SMP w/1 CPU core) Locale: LANG=en_SG.UTF-8, LC_CTYPE=en_SG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: unable to detect
--- a/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h +++ b/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h @@ -69,8 +69,12 @@ #endif #if !USE(ICU_UNICODE) +#ifdef __sparc_v9__ +typedef int32_t UChar32; +#else typedef uint32_t UChar32; #endif +#endif namespace WTF { namespace Unicode { --- a/Source/WTF/wtf/Atomics.h +++ b/Source/WTF/wtf/Atomics.h @@ -98,7 +98,7 @@ inline int atomicIncrement(int volatile* addend) { return __atomic_inc(addend) + 1; } inline int atomicDecrement(int volatile* addend) { return __atomic_dec(addend) - 1; } -#elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc +#elif COMPILER(GCC) #define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1 inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }