Bug#806816: webkit2gtk: FTBFS on sparc64
Source: webkit2gtk
Severity: normal
Tags: upstream patch
User: debian-sparc@lists.debian.org
Usertags: sparc64
The webkit2gtk build currently fails on sparc64. You can see
an example build failure log here:
https://buildd.debian.org/status/fetch.php?pkg=webkit2gtk&arch=sparc64&ver=2.10.3%2Bdfsg1-1&stamp=1448169030
I patched a few header files and the cmake build files to
help webkit understand the sparc64 platform. With these
changes the build completes successfully for me.
-- 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/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -153,6 +153,12 @@
#define WTF_CPU_BIG_ENDIAN 1
#endif
+/* CPU(SPARC64) - sparc64 */
+#if defined(__sparc__) && defined(__sparc_v9__)
+#define WTF_CPU_SPARC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
/* CPU(X86) - i386 / x86 32-bit */
#if defined(__i386__) \
|| defined(i386) \
@@ -340,7 +346,7 @@
#endif /* ARM */
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC64)
#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
#endif
@@ -692,6 +698,7 @@
|| CPU(ALPHA) \
|| CPU(ARM64) \
|| CPU(S390X) \
+ || CPU(SPARC64) \
|| CPU(MIPS64) \
|| CPU(PPC64) \
|| CPU(PPC64LE)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,8 @@
set(WTF_CPU_S390 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
+ set(WTF_CPU_SPARC64 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -1161,6 +1161,7 @@
elseif (WTF_CPU_S390X)
elseif (WTF_CPU_MIPS)
elseif (WTF_CPU_SH4)
+elseif (WTF_CPU_SPARC64)
elseif (WTF_CPU_X86)
elseif (WTF_CPU_X86_64)
if (MSVC AND ENABLE_JIT)
--- a/Source/WTF/wtf/dtoa/utils.h
+++ b/Source/WTF/wtf/dtoa/utils.h
@@ -49,7 +49,7 @@
defined(__ARMEL__) || \
defined(_MIPS_ARCH_MIPS32R2)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
+#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(SPARC64)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__)
#if defined(_WIN32)
Reply to: