git: 5f104f3192f7 - main - x11-toolkits/copperspice: fix build on armv7

From: Adriaan de Groot <adridg_at_FreeBSD.org>
Date: Sun, 12 Jun 2022 20:40:36 UTC
The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5f104f3192f7fbbe809570b9b3d85ba778e5207f

commit 5f104f3192f7fbbe809570b9b3d85ba778e5207f
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-06-05 00:15:51 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-06-12 20:40:11 +0000

    x11-toolkits/copperspice: fix build on armv7
    
    PR:             264506
---
 ...Source_JavaScriptCore_jit_ExecutableAllocator.h | 27 ++++++++++++++++++++++
 .../files/patch-src_core_global_qglobal.h          | 19 +++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/x11-toolkits/copperspice/files/patch-src_3rdparty_webkit_Source_JavaScriptCore_jit_ExecutableAllocator.h b/x11-toolkits/copperspice/files/patch-src_3rdparty_webkit_Source_JavaScriptCore_jit_ExecutableAllocator.h
new file mode 100644
index 000000000000..0045c5a8e6f3
--- /dev/null
+++ b/x11-toolkits/copperspice/files/patch-src_3rdparty_webkit_Source_JavaScriptCore_jit_ExecutableAllocator.h
@@ -0,0 +1,27 @@
+--- src/3rdparty/webkit/Source/JavaScriptCore/jit/ExecutableAllocator.h.orig	2022-06-05 21:14:42 UTC
++++ src/3rdparty/webkit/Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -54,6 +54,10 @@
+ #include <unistd.h>
+ #endif
+ 
++#if OS(FREEBSD)
++#include <machine/sysarch.h>
++#endif
++
+ #if OS(WINCE)
+ // From pkfuncs.h (private header file from the Platform Builder)
+ #define CACHE_SYNC_ALL 0x07F
+@@ -304,6 +308,13 @@ class ExecutableAllocator { (public)
+             :
+             : "r" (code), "r" (reinterpret_cast<char*>(code) + size)
+             : "r0", "r1", "r2");
++    }
++#elif (CPU(ARM_TRADITIONAL) || CPU(ARM_THUMB2)) && OS(FREEBSD)
++    static void cacheFlush(void *code, size_t size)
++    {
++        struct arm_sync_icache_args asia = { reinterpret_cast<uintptr_t>(code), size };
++
++        sysarch(ARM_SYNC_ICACHE, &asia);
+     }
+ #elif OS(WINCE)
+     static void cacheFlush(void* code, size_t size)
diff --git a/x11-toolkits/copperspice/files/patch-src_core_global_qglobal.h b/x11-toolkits/copperspice/files/patch-src_core_global_qglobal.h
new file mode 100644
index 000000000000..e3dc6e83a2df
--- /dev/null
+++ b/x11-toolkits/copperspice/files/patch-src_core_global_qglobal.h
@@ -0,0 +1,19 @@
+--- src/core/global/qglobal.h.orig	2022-06-04 14:31:11 UTC
++++ src/core/global/qglobal.h
+@@ -101,13 +101,13 @@
+ 
+ #   define Q_PROCESSOR_ARM_32
+ 
+-#   if defined(__ARM_ARCH_7__)
++#   if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
+ #      define Q_PROCESSOR_ARM      7
+ #      define Q_PROCESSOR_ARM_V7
+ 
+-#   elif defined(__ARM_ARCH_6__)
++#   elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6KZ__)
+ #      define Q_PROCESSOR_ARM      6
+-#      define Q_PROCESSOR_ARM_V8
++#      define Q_PROCESSOR_ARM_V6
+ 
+ #   elif defined(__ARM_ARCH_5__)
+ #      define Q_PROCESSOR_ARM      5