Add a bunch of patches from Todd Carson <toc at daybefore dot net> to

allow webkit to build (and even run!) on mips64el, many thanks !
Patches will probably need to be reworked so that they can be fed
upstream, but at least this allows another part of the tree to build on
loongson. And this might even work for sgi.
Tested by jasper@
This commit is contained in:
landry 2010-11-04 21:34:25 +00:00
parent f3fc458c9a
commit 02e940c277
3 changed files with 39 additions and 8 deletions

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-JavaScriptCore_wtf_Platform_h,v 1.4 2010/11/04 21:34:25 landry Exp $
Allow webkit to build and run on mips64
--- JavaScriptCore/wtf/Platform.h.orig Thu Nov 4 22:29:33 2010
+++ JavaScriptCore/wtf/Platform.h Thu Nov 4 22:29:51 2010
@@ -115,9 +115,14 @@
/* CPU(MIPS) - MIPS 32-bit */
/* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
-#if (defined(mips) || defined(__mips__)) \
- && defined(_ABIO32)
+#if (defined(mips) || defined(__mips__) || defined(__mips64__))
+#if defined(_ABIO32)
#define WTF_CPU_MIPS 1
+#endif
+#if defined(__mips64__)
+#define WTF_CPU_MIPS64 1
+#define USE_SYSTEM_MALLOC 1
+#endif
#if defined(__MIPSEB__)
#define WTF_CPU_BIG_ENDIAN 1
#endif
@@ -872,7 +877,8 @@
#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
|| (CPU(IA64) && !CPU(IA64_32)) \
|| CPU(ALPHA) \
- || CPU(SPARC64)
+ || CPU(SPARC64) \
+ || CPU(MIPS64)
#define WTF_USE_JSVALUE64 1
#elif CPU(ARM) || CPU(PPC64) || CPU(MIPS)
#define WTF_USE_JSVALUE32 1

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-WebCore_platform_text_AtomicString_cpp,v 1.1 2010/01/10 20:06:17 landry Exp $
$OpenBSD: patch-WebCore_platform_text_AtomicString_cpp,v 1.2 2010/11/04 21:34:25 landry Exp $
Fixes SIGBUS at runtime : https://bugs.webkit.org/show_bug.cgi?id=19775
--- WebCore/platform/text/AtomicString.cpp.orig Thu Jan 7 18:44:45 2010
+++ WebCore/platform/text/AtomicString.cpp Thu Jan 7 18:44:58 2010
--- WebCore/platform/text/AtomicString.cpp.orig Fri Sep 10 15:20:33 2010
+++ WebCore/platform/text/AtomicString.cpp Thu Nov 4 22:27:33 2010
@@ -105,7 +105,7 @@ static inline bool equal(StringImpl* string, const UCh
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
+#if CPU(ARM) || CPU(SH4) || CPU(SPARC64)
+#if CPU(ARM) || CPU(SH4) || CPU(SPARC64) || CPU(MIPS64)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-WebCore_platform_text_StringHash_h,v 1.1 2010/01/10 20:06:17 landry Exp $
$OpenBSD: patch-WebCore_platform_text_StringHash_h,v 1.2 2010/11/04 21:34:25 landry Exp $
Fixes SIGBUS at runtime : https://bugs.webkit.org/show_bug.cgi?id=19775
--- WebCore/platform/text/StringHash.h.orig Thu Jan 7 18:44:20 2010
+++ WebCore/platform/text/StringHash.h Thu Jan 7 18:44:40 2010
--- WebCore/platform/text/StringHash.h.orig Fri Sep 10 15:20:33 2010
+++ WebCore/platform/text/StringHash.h Thu Nov 4 22:28:16 2010
@@ -54,7 +54,7 @@ namespace WebCore {
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
+#if CPU(ARM) || CPU(SH4) || CPU(SPARC64)
+#if CPU(ARM) || CPU(SH4) || CPU(SPARC64) || CPU(MIPS64)
const UChar* aChars = a->characters();
const UChar* bChars = b->characters();
for (unsigned i = 0; i != aLength; ++i) {