summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-08-24 10:43:56 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2015-08-26 17:12:26 +0200
commitc16daba21756c661a008d3a9199d3d80aa914bdf (patch)
treee50dc1c39b8cc8fd63fce3d4e318c078212ec8a5
parentc0cc4ff88292d1ddd9d30007e4947342d71ae77d (diff)
downloadmeta-qt5-c16daba21756c661a008d3a9199d3d80aa914bdf.tar.gz
qtbase: Fix build with clang
This patch is a backport from upstream qt5 fixes building with clang from meta-clang Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb7
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb5
-rw-r--r--recipes-qt/qt5/qtbase/0008-Fix-build-with-clang-3.7.patch72
-rw-r--r--recipes-qt/qt5/qtbase/0009-Always-build-uic.patch (renamed from recipes-qt/qt5/qtbase/0008-Always-build-uic.patch)4
-rw-r--r--recipes-qt/qt5/qtbase/0009-qmake-don-t-build-it-in-configure-but-allow-to-build.patch (renamed from recipes-qt/qt5/qtbase/0008-qmake-don-t-build-it-in-configure-but-allow-to-build.patch)6
-rw-r--r--recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch (renamed from recipes-qt/qt5/qtbase/0009-Add-external-hostbindir-option-for-native-sdk.patch)4
-rw-r--r--recipes-qt/qt5/qtbase/0010-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch (renamed from recipes-qt/qt5/qtbase/0009-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch)4
-rw-r--r--recipes-qt/qt5/qtbase/0011-configure-preserve-built-qmake-and-swap-with-native-.patch (renamed from recipes-qt/qt5/qtbase/0010-configure-preserve-built-qmake-and-swap-with-native-.patch)4
-rw-r--r--recipes-qt/qt5/qtbase_git.bb5
9 files changed, 93 insertions, 18 deletions
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 28e6d09e..320cad65 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -28,17 +28,18 @@ SRC_URI += "\
28 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \ 28 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \
29 file://0006-configure-bump-path-length-from-256-to-512-character.patch \ 29 file://0006-configure-bump-path-length-from-256-to-512-character.patch \
30 file://0007-QOpenGLPaintDevice-sub-area-support.patch \ 30 file://0007-QOpenGLPaintDevice-sub-area-support.patch \
31 file://0008-Fix-build-with-clang-3.7.patch \
31" 32"
32 33
33# common for qtbase-native and nativesdk-qtbase 34# common for qtbase-native and nativesdk-qtbase
34SRC_URI += " \ 35SRC_URI += " \
35 file://0008-Always-build-uic.patch \ 36 file://0009-Always-build-uic.patch \
36 file://0009-Add-external-hostbindir-option-for-native-sdk.patch \ 37 file://0010-Add-external-hostbindir-option-for-native-sdk.patch \
37" 38"
38 39
39# specific for nativesdk-qtbase 40# specific for nativesdk-qtbase
40SRC_URI += " \ 41SRC_URI += " \
41 file://0010-configure-preserve-built-qmake-and-swap-with-native-.patch \ 42 file://0011-configure-preserve-built-qmake-and-swap-with-native-.patch \
42" 43"
43 44
44# CMake's toolchain configuration of nativesdk-qtbase 45# CMake's toolchain configuration of nativesdk-qtbase
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index e449b019..ac68f2b7 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -24,12 +24,13 @@ SRC_URI += "\
24 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \ 24 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \
25 file://0006-configure-bump-path-length-from-256-to-512-character.patch \ 25 file://0006-configure-bump-path-length-from-256-to-512-character.patch \
26 file://0007-QOpenGLPaintDevice-sub-area-support.patch \ 26 file://0007-QOpenGLPaintDevice-sub-area-support.patch \
27 file://0008-Fix-build-with-clang-3.7.patch \
27" 28"
28 29
29# common for qtbase-native and nativesdk-qtbase 30# common for qtbase-native and nativesdk-qtbase
30SRC_URI += " \ 31SRC_URI += " \
31 file://0008-Always-build-uic.patch \ 32 file://0009-Always-build-uic.patch \
32 file://0009-Add-external-hostbindir-option-for-native-sdk.patch \ 33 file://0010-Add-external-hostbindir-option-for-native-sdk.patch \
33" 34"
34 35
35CLEANBROKEN = "1" 36CLEANBROKEN = "1"
diff --git a/recipes-qt/qt5/qtbase/0008-Fix-build-with-clang-3.7.patch b/recipes-qt/qt5/qtbase/0008-Fix-build-with-clang-3.7.patch
new file mode 100644
index 00000000..6583e80a
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0008-Fix-build-with-clang-3.7.patch
@@ -0,0 +1,72 @@
1From 63111eaec5cb758d99d68a4e9ec827b79121544b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Aug 2015 15:19:41 -0700
4Subject: [PATCH 08/10] Fix build with clang 3.7
5
6Nullable is a language extension in clang 3.7 (indicating whether or
7not a pointer can be null).
8http://clang.llvm.org/docs/AttributeReference.html#nullable
9Using it as a class name breaks building with this compiler
10
11Upstream-Status: Backport
12This is backport of https://codereview.qt-project.org/#/c/121545/
13
14/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:241:1: error: declaration of anonymous
15 struct must be a definition
16struct _Nullable: public std::unary_function<Name, bool>
17^
18/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:241:56: error: expected unqualified-id
19struct _Nullable: public std::unary_function<Name, bool>
20 ^
21/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:303:98: error: expected expression
22 NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
23 ^
24/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:638:107: error: expected expression
25 NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
26 ^
274 errors generated.
28
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 src/tools/qlalr/lalr.cpp | 8 ++++----
32 1 file changed, 4 insertions(+), 4 deletions(-)
33
34diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp
35index 3d0d5de..3d780cd 100644
36--- a/src/tools/qlalr/lalr.cpp
37+++ b/src/tools/qlalr/lalr.cpp
38@@ -238,11 +238,11 @@ void Grammar::buildExtendedGrammar ()
39 non_terminals.insert (accept_symbol);
40 }
41
42-struct _Nullable: public std::unary_function<Name, bool>
43+struct Nullable: public std::unary_function<Name, bool>
44 {
45 Automaton *_M_automaton;
46
47- _Nullable (Automaton *aut):
48+ Nullable (Automaton *aut):
49 _M_automaton (aut) {}
50
51 bool operator () (Name name) const
52@@ -300,7 +300,7 @@ void Automaton::buildNullables ()
53
54 for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule)
55 {
56- NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
57+ NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (Nullable (this)));
58
59 if (nn == rule->rhs.end ())
60 changed |= nullables.insert (rule->lhs).second;
61@@ -635,7 +635,7 @@ void Automaton::buildIncludesDigraph ()
62 if (! _M_grammar->isNonTerminal (*A))
63 continue;
64
65- NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
66+ NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (Nullable (this)));
67 if (first_not_nullable != rule->rhs.end ())
68 continue;
69
70--
712.5.0
72
diff --git a/recipes-qt/qt5/qtbase/0008-Always-build-uic.patch b/recipes-qt/qt5/qtbase/0009-Always-build-uic.patch
index 11e1bcb7..59266f48 100644
--- a/recipes-qt/qt5/qtbase/0008-Always-build-uic.patch
+++ b/recipes-qt/qt5/qtbase/0009-Always-build-uic.patch
@@ -1,7 +1,7 @@
1From 7159760b75cc338faee3e95d26d3aea377473681 Mon Sep 17 00:00:00 2001 1From c6a58549ef110a31960fca80f6d3dcdcf4d9176a Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 16 Nov 2013 00:32:30 +0100 3Date: Sat, 16 Nov 2013 00:32:30 +0100
4Subject: [PATCH 08/10] Always build uic 4Subject: [PATCH 09/11] Always build uic
5 5
6Even if we are not building gui or widgets. This tool is needed later 6Even if we are not building gui or widgets. This tool is needed later
7as a native tool when compiling the target. 7as a native tool when compiling the target.
diff --git a/recipes-qt/qt5/qtbase/0008-qmake-don-t-build-it-in-configure-but-allow-to-build.patch b/recipes-qt/qt5/qtbase/0009-qmake-don-t-build-it-in-configure-but-allow-to-build.patch
index ef8fcb2a..85213271 100644
--- a/recipes-qt/qt5/qtbase/0008-qmake-don-t-build-it-in-configure-but-allow-to-build.patch
+++ b/recipes-qt/qt5/qtbase/0009-qmake-don-t-build-it-in-configure-but-allow-to-build.patch
@@ -1,8 +1,8 @@
1From 890df28110c254022682b38f78bbbea1d62b8081 Mon Sep 17 00:00:00 2001 1From 744fc89cd56387cac613534adc538900ed133b25 Mon Sep 17 00:00:00 2001
2From: Michael Krelin <hacker@klever.net> 2From: Michael Krelin <hacker@klever.net>
3Date: Mon, 29 Oct 2012 20:07:49 -0700 3Date: Mon, 29 Oct 2012 20:07:49 -0700
4Subject: [PATCH 8/9] qmake: don't build it in configure, but allow to build it 4Subject: [PATCH 09/10] qmake: don't build it in configure, but allow to build
5 separately 5 it separately
6 6
7* it is already built in qtbase-native, so we don't need it in configure 7* it is already built in qtbase-native, so we don't need it in configure
8* allow building a separate qmake for the target 8* allow building a separate qmake for the target
diff --git a/recipes-qt/qt5/qtbase/0009-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch
index 59b67289..4e770ee4 100644
--- a/recipes-qt/qt5/qtbase/0009-Add-external-hostbindir-option-for-native-sdk.patch
+++ b/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch
@@ -1,7 +1,7 @@
1From a48e2ad5bef673e9d345d5d6de94e5bbda53fa2b Mon Sep 17 00:00:00 2001 1From b0ab57e1f0781b73830514ddc498f38da0886d15 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200 3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 09/10] Add -external-hostbindir option for native(sdk) 4Subject: [PATCH 10/11] Add -external-hostbindir option for native(sdk)
5 5
6* when cross-compiling it's sometimes useful to use existing tools from machine 6* when cross-compiling it's sometimes useful to use existing tools from machine
7 (or in OpenEmbedded built with separate native recipe) when building for target 7 (or in OpenEmbedded built with separate native recipe) when building for target
diff --git a/recipes-qt/qt5/qtbase/0009-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch b/recipes-qt/qt5/qtbase/0010-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
index 3be238b6..0069a170 100644
--- a/recipes-qt/qt5/qtbase/0009-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
+++ b/recipes-qt/qt5/qtbase/0010-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
@@ -1,7 +1,7 @@
1From 168bf7753c648e7599ab9967501e74373037f5e9 Mon Sep 17 00:00:00 2001 1From bae2c6afb951d1352845ca257fdc2389f3fe851e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 8 Jun 2015 13:59:25 -0700 3Date: Mon, 8 Jun 2015 13:59:25 -0700
4Subject: [PATCH 9/9] linux-oe-g++: Invert conditional for defining 4Subject: [PATCH 10/10] linux-oe-g++: Invert conditional for defining
5 QT_SOCKLEN_T 5 QT_SOCKLEN_T
6 6
7This helps to make sure that QT_SOCKLEN_T is defined to be 'int' 7This helps to make sure that QT_SOCKLEN_T is defined to be 'int'
diff --git a/recipes-qt/qt5/qtbase/0010-configure-preserve-built-qmake-and-swap-with-native-.patch b/recipes-qt/qt5/qtbase/0011-configure-preserve-built-qmake-and-swap-with-native-.patch
index 109c7d18..1bfe8255 100644
--- a/recipes-qt/qt5/qtbase/0010-configure-preserve-built-qmake-and-swap-with-native-.patch
+++ b/recipes-qt/qt5/qtbase/0011-configure-preserve-built-qmake-and-swap-with-native-.patch
@@ -1,7 +1,7 @@
1From ee09941be5f00409029497b65358f8b8d3db91de Mon Sep 17 00:00:00 2001 1From cef1ac9fa399ad5c57480de26a1ef441414f125c Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com> 2From: Denys Dmytriyenko <denys@ti.com>
3Date: Mon, 11 Nov 2013 20:22:34 -0500 3Date: Mon, 11 Nov 2013 20:22:34 -0500
4Subject: [PATCH 10/10] configure: preserve built qmake and swap with native 4Subject: [PATCH 11/11] configure: preserve built qmake and swap with native
5 one 5 one
6 6
7Let configure script build the real qmake, but right after it's built, swap 7Let configure script build the real qmake, but right after it's built, swap
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index e1d208d1..0d3f685d 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -18,12 +18,13 @@ SRC_URI += "\
18 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \ 18 file://0005-qeglplatformintegration-Undefine-CursorShape-from-X..patch \
19 file://0006-configure-bump-path-length-from-256-to-512-character.patch \ 19 file://0006-configure-bump-path-length-from-256-to-512-character.patch \
20 file://0007-QOpenGLPaintDevice-sub-area-support.patch \ 20 file://0007-QOpenGLPaintDevice-sub-area-support.patch \
21 file://0008-Fix-build-with-clang-3.7.patch \
21" 22"
22 23
23# specific for target qtbase 24# specific for target qtbase
24SRC_URI += "\ 25SRC_URI += "\
25 file://0008-qmake-don-t-build-it-in-configure-but-allow-to-build.patch \ 26 file://0009-qmake-don-t-build-it-in-configure-but-allow-to-build.patch \
26 file://0009-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \ 27 file://0010-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
27" 28"
28 29
29DEPENDS += "qtbase-native" 30DEPENDS += "qtbase-native"