xref: /OK3568_Linux_fs/buildroot/package/qt5/qt5script/0001-Detect-32-bits-armv8-a-architecture.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From daf2e222903bacf85f27dfb0fffc4459bbf58b77 Mon Sep 17 00:00:00 2001
2From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@savoirfairelinux.com>
3Date: Sun, 10 Jun 2018 08:23:50 -0400
4Subject: [PATCH] Detect 32-bits armv8-a architecture
5MIME-Version: 1.0
6Content-Type: text/plain; charset=utf-8
7Content-Transfer-Encoding: 8bit
8
9These toolchains define __ARM_ARCH_8A__ (for ARM architecture version)
10and __arm__ (for 32-bits word-size; __aarch64__ for 64-bits).
11
12This commit catches this new architecture (armv8a) within a #ifdef/#endif
13inside the if statement dedicated for 32-bits ARM detection. See commit
14from WebKit [1] and [2].
15
16Fixes:
17
18	In file included from ../3rdparty/javascriptcore/JavaScriptCore/config.h:26,
19	                 from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp:44:
20	../3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:370:6: error: #error "Not supported ARM architecture"
21	 #    error "Not supported ARM architecture"
22	      ^~~~~
23
24[1]: https://github.com/WebKit/webkit/commit/313d9fc4bdd2f020a5d0cf834c3c61982f161ebb
25[2]: https://github.com/WebKit/webkit/commit/98f0de0709786f5d9b09dfd5908266990eb909d6
26
27Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
28---
29 src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h | 4 ++++
30 1 file changed, 4 insertions(+)
31
32diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
33index 00caa6d..c4b758e 100644
34--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
35+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
36@@ -306,6 +306,10 @@
37     || defined(__ARM_ARCH_7R__)
38 #define WTF_ARM_ARCH_VERSION 7
39
40+#elif defined(__ARM_ARCH_8__) \
41+    || defined(__ARM_ARCH_8A__)
42+#define WTF_ARM_ARCH_VERSION 8
43+
44 /* RVCT sets _TARGET_ARCH_ARM */
45 #elif defined(__TARGET_ARCH_ARM)
46 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
47--
482.17.1
49
50