$OpenBSD: patch-src_3rdparty_webkit_Source_JavaScriptCore_wtf_Platform_h,v 1.3 2017/05/03 07:18:50 espie Exp $
Index: src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h.orig
+++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
@@ -145,19 +145,19 @@
 #endif
 
 /* CPU(MIPS) - MIPS 32-bit and 64-bit */
-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) \
-    || defined(__mips64))
-#if defined(__mips64)
-#define WTF_CPU_MIPS64 1
-#define WTF_MIPS_ARCH __mips64
-#else
+#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64__))
+#if defined(_ABIO32)
 #define WTF_CPU_MIPS 1
-#define WTF_MIPS_ARCH __mips
 #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
 #define WTF_MIPS_PIC (defined __PIC__)
+#define WTF_MIPS_ARCH __mips
 #define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
 #define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
 #define WTF_MIPS_ARCH_REV __mips_isa_rev
@@ -236,6 +236,10 @@
 #define WTF_CPU_X86_64 1
 #endif
 
+#if defined(__aarch64__)
+#define WTF_CPU_ARM64 1
+#endif
+
 /* CPU(ARM) - ARM, any version*/
 #if   defined(arm) \
     || defined(__arm__) \
@@ -369,7 +373,7 @@
 
 #endif /* ARM */
 
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(MIPS64) || CPU(SPARC64)
 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
 #endif
 
@@ -1003,7 +1007,8 @@
     || CPU(SPARC64) \
     || CPU(S390X) \
     || CPU(PPC64) \
-    || CPU(MIPS64)
+    || CPU(MIPS64) \
+    || CPU(ARM64)
 #define WTF_USE_JSVALUE64 1
 #else
 #define WTF_USE_JSVALUE32_64 1
