summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKrishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>2015-04-15 13:53:48 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-03 11:43:49 +0100
commit5bed033beb81848df2d3d4ecc1accc3c86282fcd (patch)
tree356c381143b63631b293b0aedf00435c3f22c2e8 /meta
parenteea3a90653d32570c4ee32c6074278e028471e5f (diff)
downloadpoky-5bed033beb81848df2d3d4ecc1accc3c86282fcd.tar.gz
qt4-embedded: add checking for AArch64 ilp32
1. Cross-compiling qt4-embedded and qt4-x11-free applications for AArch64 ilp32 (both big and little endian) fails with below error, (snip) In file included from ../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:31:0, from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.h:32, from ../3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h:26, from ../3rdparty/javascriptcore/JavaScriptCore/runtime/ClassInfo.h:26, from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h:27, from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.h:30, from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.cpp:27: ../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [with TO = int; FROM = double]': ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:52:49: required from here ../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative ../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [with TO = double; FROM = int]': ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:57:47: required from here ../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative make[1]: *** [obj/release/JSCallbackConstructor.o] Error 1 -- CUT -- the error is because of JSVALUE64 is being defined while compiling programs for AArch64 ilp32. This makes equal condition checking of intptr_t and double datatypes as false, and results in -1 (negative) as array size in bitwise_cast function. The patch defines JSVALUE64, if the programs are being compiled for AArch64 64bit NOT for ilp32. 2. qt4_arch.inc is modified to set system architecture as aarch64 if the TARGET_ARCH is other than aarch64. Without this modification, for TARGET_ARCH equal to aarch64_32, aarch64be, aarch64be_32; the system architecture is set as 'generic' and results in below error. configure log: (snip) 64-bit AMD 80x86 (x86_64) '-opensource' is unsupported, using 'generic' 'x86_64' is supported System architecture: 'generic' Host architecture: 'x86_64' -- CUT -- build error: (snip) In file included from ../../include/QtCore/qatomic_generic.h:1:0, from ../../include/QtCore/../../src/corelib/arch/qatomic_arch.h:64, from ../../include/QtCore/qatomic_arch.h:1, from ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:227, from ../../include/QtCore/qbasicatomic.h:1, from ../../include/QtCore/../../src/corelib/thread/qatomic.h:46, from ../../include/QtCore/qatomic.h:1, from ../../include/QtCore/../../src/corelib/tools/qbytearray.h:45, from ../../include/QtCore/qbytearray.h:1, from ../../include/QtCore/../../src/corelib/tools/qstring.h:46, from ../../include/QtCore/qstring.h:1, from ../../include/QtCore/../../src/corelib/kernel/qobject.h:48, from ../../include/QtCore/qobject.h:1, from ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:45, from ../../include/QtCore/qcoreapplication.h:1, from qdbusintegrator.cpp:42: ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h: In instantiation of 'bool QBasicAtomicPointer<T>::testAndSetOrdered(T*, T*) [with T = const QString]': qdbusintegrator.cpp:76:1: required from here ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:197:88: error: invalid conversion from 'const void*' to 'void*' [-fpermissive] ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:108:20: error: initializing argument 2 of 'bool QBasicAtomicPointer_testAndSetOrdered(void* volatile*, void*, void*)' [-fpermissive] ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:197:88: error: invalid conversion from 'const void*' to 'void*' [-fpermissive] ../../include/QtCore/../../src/corelib/arch/qatomic_generic.h:108:20: error: initializing argument 3 of 'bool QBasicAtomicPointer_testAndSetOrdered(void* volatile*, void*, void*)' [-fpermissive] make[1]: *** [.obj/release-shared-emb-auto/qdbusintegrator.o] Error 1 make[1]: *** Waiting for unfinished jobs.... -- CUT -- So, select system architecture (via QT_ARCH) as aarch64 for AArch64 and its other variants (From OE-Core rev: 5f191d86b8d60624d729b3b147c1dff818326dbd) Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6.inc1
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/add_check_for_aarch64_32.patch55
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc2
3 files changed, 57 insertions, 1 deletions
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6.inc b/meta/recipes-qt/qt4/qt4-4.8.6.inc
index 19f52a7711..0cb7f80928 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6.inc
+++ b/meta/recipes-qt/qt4/qt4-4.8.6.inc
@@ -28,6 +28,7 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
28 file://0032-aarch64_add_header.patch \ 28 file://0032-aarch64_add_header.patch \
29 file://0034-Fix-a-division-by-zero-when-processing-malformed-BMP.patch \ 29 file://0034-Fix-a-division-by-zero-when-processing-malformed-BMP.patch \
30 file://Fix-QWSLock-invalid-argument-logs.patch \ 30 file://Fix-QWSLock-invalid-argument-logs.patch \
31 file://add_check_for_aarch64_32.patch \
31 file://g++.conf \ 32 file://g++.conf \
32 file://linux.conf \ 33 file://linux.conf \
33 " 34 "
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/add_check_for_aarch64_32.patch b/meta/recipes-qt/qt4/qt4-4.8.6/add_check_for_aarch64_32.patch
new file mode 100644
index 0000000000..ad5103dd02
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/add_check_for_aarch64_32.patch
@@ -0,0 +1,55 @@
1Author: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
2Date: Sun Apr 12 19:27:10 2015 +0530
3
4[PATCH] add checking for AArch64 ilp32
5
6Cross-compiling qt4-embedded and qt4-x11-free applications for AArch64 ilp32
7(both big and little endian) fails with below error,
8
9(snip)
10In file included from ../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:31:0,
11 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.h:32,
12 from ../3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h:26,
13 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/ClassInfo.h:26,
14 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h:27,
15 from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.h:30,
16 from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.cpp:27:
17../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [w
18../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:52:49: required from here
19../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative
20../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [w
21../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:57:47: required from here
22../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative
23make[1]: *** [obj/release/JSCallbackConstructor.o] Error 1
24-- CUT --
25
26the error is because of JSVALUE64 is being defined while compiling programs
27for AArch64 ilp32. This makes equal condition checking of intptr_t and double
28datatypes as false, and results in -1 (negative) as array size in bitwise_cast
29function.
30
31Upstream-Status: Pending
32
33Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
34
35--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2014-04-11 00:07:12.000000000 +0530
36+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2015-04-10 22:19:51.066279426 +0530
37@@ -214,6 +214,9 @@
38 #define WTF_CPU_AARCH64 1
39 #if defined(__AARCH64EB__)
40 #define WTF_CPU_BIG_ENDIAN 1
41+#if !defined(__LP64__)
42+#define WTF_CPU_AARCH64_32 1
43+#endif
44 #endif
45 #endif
46
47@@ -903,7 +906,7 @@
48 #endif
49
50 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
51-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64)
52+#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || (CPU(AARCH64) && !CPU(AARCH64_32))
53 #define WTF_USE_JSVALUE64 1
54 #elif CPU(ARM) || CPU(PPC64)
55 #define WTF_USE_JSVALUE32 1
diff --git a/meta/recipes-qt/qt4/qt4_arch.inc b/meta/recipes-qt/qt4/qt4_arch.inc
index 07512db713..e94c2847b7 100644
--- a/meta/recipes-qt/qt4/qt4_arch.inc
+++ b/meta/recipes-qt/qt4/qt4_arch.inc
@@ -4,7 +4,7 @@ ARM_INSTRUCTION_SET = "arm"
4 4
5set_arch() { 5set_arch() {
6 case ${TARGET_ARCH} in 6 case ${TARGET_ARCH} in
7 aarch64) QT_ARCH=aarch64 ;; 7 aarch64*) QT_ARCH=aarch64 ;;
8 arm*) QT_ARCH=arm ;; 8 arm*) QT_ARCH=arm ;;
9 i*86*) QT_ARCH=i386 ;; 9 i*86*) QT_ARCH=i386 ;;
10 mips*) QT_ARCH=mips ;; 10 mips*) QT_ARCH=mips ;;