diff options
-rw-r--r-- | classes/qmake5_base.bbclass | 7 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase-native_git.bb | 6 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch | 72 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 6 |
4 files changed, 87 insertions, 4 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index a556f4f9..8e1fe206 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass | |||
@@ -1,6 +1,9 @@ | |||
1 | # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds | 1 | # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds |
2 | OE_QMAKE_PLATFORM_NATIVE = "linux-oe-g++" | 2 | XPLATFORM_toolchain-clang = "linux-oe-clang" |
3 | OE_QMAKE_PLATFORM = "linux-oe-g++" | 3 | XPLATFORM ?= "linux-oe-g++" |
4 | |||
5 | OE_QMAKE_PLATFORM_NATIVE = "${XPLATFORM}" | ||
6 | OE_QMAKE_PLATFORM = "${XPLATFORM}" | ||
4 | 7 | ||
5 | # Add -d to show debug output from every qmake call, but it prints *a lot*, better to add it only to debugged recipe | 8 | # Add -d to show debug output from every qmake call, but it prints *a lot*, better to add it only to debugged recipe |
6 | OE_QMAKE_DEBUG_OUTPUT ?= "" | 9 | OE_QMAKE_DEBUG_OUTPUT ?= "" |
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 54a0b785..72b977d3 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb | |||
@@ -38,10 +38,14 @@ SRC_URI += "\ | |||
38 | # 5.9.meta-qt5-native.2 | 38 | # 5.9.meta-qt5-native.2 |
39 | SRC_URI += " \ | 39 | SRC_URI += " \ |
40 | file://0009-Always-build-uic.patch \ | 40 | file://0009-Always-build-uic.patch \ |
41 | file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ | ||
41 | " | 42 | " |
42 | 43 | ||
43 | CLEANBROKEN = "1" | 44 | CLEANBROKEN = "1" |
44 | 45 | ||
46 | XPLATFORM_toolchain-clang = "linux-oe-clang" | ||
47 | XPLATFORM ?= "linux-oe-g++" | ||
48 | |||
45 | PACKAGECONFIG_CONFARGS = " \ | 49 | PACKAGECONFIG_CONFARGS = " \ |
46 | -sysroot ${STAGING_DIR_NATIVE} \ | 50 | -sysroot ${STAGING_DIR_NATIVE} \ |
47 | -no-gcc-sysroot \ | 51 | -no-gcc-sysroot \ |
@@ -79,7 +83,7 @@ PACKAGECONFIG_CONFARGS = " \ | |||
79 | -nomake examples \ | 83 | -nomake examples \ |
80 | -nomake tests \ | 84 | -nomake tests \ |
81 | -no-rpath \ | 85 | -no-rpath \ |
82 | -platform linux-oe-g++ \ | 86 | -platform ${XPLATFORM} \ |
83 | " | 87 | " |
84 | 88 | ||
85 | # for qtbase configuration we need default settings | 89 | # for qtbase configuration we need default settings |
diff --git a/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch new file mode 100644 index 00000000..b019f67c --- /dev/null +++ b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 3a46fb7b47d19c5261e1590f8d70fe41443def64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 3 Sep 2017 09:11:44 -0700 | ||
4 | Subject: [PATCH] Add OE specific specs for clang compiler | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | mkspecs/linux-oe-clang/qmake.conf | 43 ++++++++++++++++++++++++++++++++++ | ||
9 | mkspecs/linux-oe-clang/qplatformdefs.h | 1 + | ||
10 | 2 files changed, 44 insertions(+) | ||
11 | create mode 100644 mkspecs/linux-oe-clang/qmake.conf | ||
12 | create mode 100644 mkspecs/linux-oe-clang/qplatformdefs.h | ||
13 | |||
14 | diff --git a/mkspecs/linux-oe-clang/qmake.conf b/mkspecs/linux-oe-clang/qmake.conf | ||
15 | new file mode 100644 | ||
16 | index 0000000000..ffc9f051db | ||
17 | --- /dev/null | ||
18 | +++ b/mkspecs/linux-oe-clang/qmake.conf | ||
19 | @@ -0,0 +1,43 @@ | ||
20 | +# | ||
21 | +# qmake configuration for linux-g++ with modifications for building with OpenEmbedded | ||
22 | +# | ||
23 | + | ||
24 | +MAKEFILE_GENERATOR = UNIX | ||
25 | +CONFIG += incremental | ||
26 | +QMAKE_INCREMENTAL_STYLE = sublib | ||
27 | + | ||
28 | +include(../common/linux.conf) | ||
29 | + | ||
30 | +# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip | ||
31 | +QMAKE_AR = $$(OE_QMAKE_AR) cqs | ||
32 | +QMAKE_STRIP = $$(OE_QMAKE_STRIP) | ||
33 | +QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER) | ||
34 | + | ||
35 | +include(../common/gcc-base-unix.conf) | ||
36 | + | ||
37 | +# *FLAGS from gcc-base.conf | ||
38 | +QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS) | ||
39 | +QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS) | ||
40 | +QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS) | ||
41 | + | ||
42 | +include(../common/clang.conf) | ||
43 | + | ||
44 | +# tc settings from g++-base.conf | ||
45 | +QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) clang | ||
46 | +QMAKE_CC = $$(OE_QMAKE_CC) | ||
47 | +QMAKE_CXX = $$(OE_QMAKE_CXX) | ||
48 | + | ||
49 | +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS) | ||
50 | + | ||
51 | +QMAKE_LINK = $$(OE_QMAKE_LINK) | ||
52 | +QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK) | ||
53 | +QMAKE_LINK_C = $$(OE_QMAKE_LINK) | ||
54 | +QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK) | ||
55 | + | ||
56 | +# for the SDK | ||
57 | +isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG) | ||
58 | + | ||
59 | +include(../oe-device-extra.pri) | ||
60 | + | ||
61 | +load(device_config) | ||
62 | +load(qt_config) | ||
63 | diff --git a/mkspecs/linux-oe-clang/qplatformdefs.h b/mkspecs/linux-oe-clang/qplatformdefs.h | ||
64 | new file mode 100644 | ||
65 | index 0000000000..880c927b21 | ||
66 | --- /dev/null | ||
67 | +++ b/mkspecs/linux-oe-clang/qplatformdefs.h | ||
68 | @@ -0,0 +1 @@ | ||
69 | +#include "../linux-clang/qplatformdefs.h" | ||
70 | -- | ||
71 | 2.14.1 | ||
72 | |||
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index aaa59f33..25d99e83 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb | |||
@@ -26,6 +26,7 @@ SRC_URI += "\ | |||
26 | file://0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ | 26 | file://0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ |
27 | file://0007-Delete-qlonglong-and-qulonglong.patch \ | 27 | file://0007-Delete-qlonglong-and-qulonglong.patch \ |
28 | file://0008-Replace-pthread_yield-with-sched_yield.patch \ | 28 | file://0008-Replace-pthread_yield-with-sched_yield.patch \ |
29 | file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ | ||
29 | file://run-ptest \ | 30 | file://run-ptest \ |
30 | " | 31 | " |
31 | 32 | ||
@@ -160,6 +161,9 @@ QT_CONFIG_FLAGS += " \ | |||
160 | # since we cannot set empty set filename to a not existent file | 161 | # since we cannot set empty set filename to a not existent file |
161 | deltask generate_qt_config_file | 162 | deltask generate_qt_config_file |
162 | 163 | ||
164 | XPLATFORM_toolchain-clang = "linux-oe-clang" | ||
165 | XPLATFORM ?= "linux-oe-g++" | ||
166 | |||
163 | do_configure() { | 167 | do_configure() { |
164 | # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration | 168 | # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration |
165 | touch ${S}/mkspecs/oe-device-extra.pri | 169 | touch ${S}/mkspecs/oe-device-extra.pri |
@@ -188,7 +192,7 @@ do_configure() { | |||
188 | -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ | 192 | -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ |
189 | -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ | 193 | -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ |
190 | -platform ${OE_QMAKE_PLATFORM_NATIVE} \ | 194 | -platform ${OE_QMAKE_PLATFORM_NATIVE} \ |
191 | -xplatform linux-oe-g++ \ | 195 | -xplatform ${XPLATFORM} \ |
192 | ${QT_CONFIG_FLAGS} | 196 | ${QT_CONFIG_FLAGS} |
193 | } | 197 | } |
194 | 198 | ||