summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt5/qtbase
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt5/qtbase')
-rw-r--r--meta/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch133
-rw-r--r--meta/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch86
-rw-r--r--meta/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch36
-rw-r--r--meta/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch34
-rw-r--r--meta/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch25
-rw-r--r--meta/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch63
-rw-r--r--meta/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch25
-rw-r--r--meta/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch60
-rw-r--r--meta/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch69
-rw-r--r--meta/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch32
-rw-r--r--meta/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch25
-rw-r--r--meta/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch33
-rw-r--r--meta/recipes-qt/qt5/qtbase/0013-Always-build-uic-and-qvkgen.patch28
-rw-r--r--meta/recipes-qt/qt5/qtbase/0014-Bootstrap-without-linkat-feature.patch27
-rw-r--r--meta/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake1
15 files changed, 677 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/meta/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
new file mode 100644
index 0000000000..07fc2f77b7
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -0,0 +1,133 @@
+From 1ed7a2e9a883fe1240d89b7b70fb0f296bb2b54f Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Mon, 15 Apr 2013 04:29:32 +0200
+Subject: [PATCH] Add linux-oe-g++ platform
+
+* This qmake.conf unlike other platforms reads most variables from
+ shell environment, because it's easier for qt recipes to export
+ *FLAGS or CC specific for given recipe
+
+* configure: extend setBootstrapVariable to convert $$(...) operator
+ to $(...) operator to work in qmake's Makefiles
+
+* configure.prf: Allow to add extra arguments to make
+ sometimes we would like to add -e or define some variable and respect it from both
+ Makefiles used in configure tests and also Makefiles to build the application
+
+Upstream-Status: Inappropriate [embedded specific]
+ too OE specific, probably cannot be upstreamed
+
+Change-Id: I0591ed5da0d61d7cf1509d420e6b293582f1863c
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure | 2 +-
+ mkspecs/features/configure.prf | 4 ++--
+ mkspecs/features/qt_functions.prf | 2 +-
+ mkspecs/linux-oe-g++/qmake.conf | 42 ++++++++++++++++++++++++++++++++++++
+ mkspecs/linux-oe-g++/qplatformdefs.h | 1 +
+ 5 files changed, 47 insertions(+), 4 deletions(-)
+ create mode 100644 mkspecs/linux-oe-g++/qmake.conf
+ create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
+
+diff --git a/configure b/configure
+index 08b49a8..5876721 100755
+--- a/configure
++++ b/configure
+@@ -712,7 +712,7 @@ fi
+ # is where the resulting variable is written to
+ setBootstrapVariable()
+ {
+- getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
++ getQMakeConf "$1" | sed 's:\$\$(:\$(:' | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
+ }
+
+ # build qmake
+diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
+index 934a18a..0f5b1b6 100644
+--- a/mkspecs/features/configure.prf
++++ b/mkspecs/features/configure.prf
+@@ -46,14 +46,14 @@ defineTest(qtCompileTest) {
+ }
+
+ # Clean up after previous run
+- exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
++ exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS) distclean")
+
+ mkpath($$test_out_dir)|error()
+
+ !isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF
+
+ qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) $$qtconfarg -spec $$QMAKESPEC $$qmake_configs $$shell_quote($$test_dir)") {
+- qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE") {
++ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS)") {
+ log("yes$$escape_expand(\\n)")
+ msg = "test $$1 succeeded"
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
+index 1903e50..c093dd4 100644
+--- a/mkspecs/features/qt_functions.prf
++++ b/mkspecs/features/qt_functions.prf
+@@ -69,7 +69,7 @@ defineTest(qtHaveModule) {
+ defineTest(qtPrepareTool) {
+ cmd = $$eval(QT_TOOL.$${2}.binary)
+ isEmpty(cmd) {
+- cmd = $$[QT_HOST_BINS]/$$2
++ cmd = $$[QT_HOST_BINS/get]/$$2
+ exists($${cmd}.pl) {
+ $${1}_EXE = $${cmd}.pl
+ cmd = perl -w $$system_path($${cmd}.pl)
+diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
+new file mode 100644
+index 0000000..30d31ed
+--- /dev/null
++++ b/mkspecs/linux-oe-g++/qmake.conf
+@@ -0,0 +1,42 @@
++#
++# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
++#
++
++MAKEFILE_GENERATOR = UNIX
++CONFIG += incremental
++QMAKE_INCREMENTAL_STYLE = sublib
++
++include(../common/linux.conf)
++
++# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
++QMAKE_AR = $$(OE_QMAKE_AR) cqs
++QMAKE_STRIP = $$(OE_QMAKE_STRIP)
++
++include(../common/gcc-base-unix.conf)
++
++# *FLAGS from gcc-base.conf
++QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS)
++QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS)
++QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS)
++
++include(../common/g++-unix.conf)
++
++# tc settings from g++-base.conf
++QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) gcc
++QMAKE_CC = $$(OE_QMAKE_CC)
++QMAKE_CXX = $$(OE_QMAKE_CXX)
++
++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS)
++
++QMAKE_LINK = $$(OE_QMAKE_LINK)
++QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK)
++
++# for the SDK
++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG)
++
++include(../oe-device-extra.pri)
++
++load(device_config)
++load(qt_config)
+diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h
+new file mode 100644
+index 0000000..5d22fb4
+--- /dev/null
++++ b/mkspecs/linux-oe-g++/qplatformdefs.h
+@@ -0,0 +1 @@
++#include "../linux-g++/qplatformdefs.h"
diff --git a/meta/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch b/meta/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch
new file mode 100644
index 0000000000..fa59883490
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch
@@ -0,0 +1,86 @@
+From c7dd4e5de1fac8c35df79a86418b6cd552024bd0 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 6 Apr 2013 13:15:07 +0200
+Subject: [PATCH] cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS
+
+... to determine path to host binaries
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Simon Busch <morphis@gravedo.de>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+
+Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
+---
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
+ src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
+ src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
+index 545b9a3..c991a9b 100644
+--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
+@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+@@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
+index 1d94715..301af8f 100644
+--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
++++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
+@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_DBus_check_file_exists(${imported_location})
+
+@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_DBus_check_file_exists(${imported_location})
+
+diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+index 99d87e2..5621dc0 100644
+--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
++++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic)
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Widgets_check_file_exists(${imported_location})
+
diff --git a/meta/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/meta/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
new file mode 100644
index 0000000000..cc0a330517
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
@@ -0,0 +1,36 @@
+From f1d359e60e76867cee1df636c5c834fe829f5316 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@selfish.org>
+Date: Wed, 26 Sep 2012 17:22:30 +0200
+Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
+ environment
+
+Allow to set a qt.conf from the outside using the environment. This allows
+to inject new prefixes and other paths into qmake. This is needed when using
+the same qmake binary to build qt/x11 and qt/embedded
+
+Upstream-Status: Inappropriate [embedded specific]
+ again very OE specific to read everything from environment (reusing the same
+ qmake from sstate and replacing all configured paths in it with qt.conf from
+ environment).
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/corelib/global/qlibraryinfo.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
+index b4ba0b5..11d4c00 100644
+--- a/src/corelib/global/qlibraryinfo.cpp
++++ b/src/corelib/global/qlibraryinfo.cpp
+@@ -172,7 +172,10 @@ void QLibrarySettings::load()
+ QSettings *QLibraryInfoPrivate::findConfiguration()
+ {
+ #ifdef QT_BUILD_QMAKE
+- QString qtconfig = qmake_libraryInfoFile();
++ QByteArray config = getenv("OE_QMAKE_QTCONF_PATH");
++ QString qtconfig = QFile::decodeName(config);
++ if(!QFile::exists(qtconfig))
++ qtconfig = qmake_libraryInfoFile();
+ if (QFile::exists(qtconfig))
+ return new QSettings(qtconfig, QSettings::IniFormat);
+ #else
diff --git a/meta/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch b/meta/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch
new file mode 100644
index 0000000000..5a3dfea2f5
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch
@@ -0,0 +1,34 @@
+From cb813ec552f965208ecfc9750a0fbf10841322fb Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@ti.com>
+Date: Tue, 25 Aug 2015 10:05:15 -0400
+Subject: [PATCH] configure: bump path length from 256 to 512 characters
+
+Increase the path length that gets hardcoded into generated config.cpp file
+from 256 to 512 characters, as nativesdk path can be quite long.
+
+Also update length of EXT_PREFIX and HOST_PREFIX now.
+
+Change-Id: If98dd57160efe9c98c36148cdf872f50b3d38118
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+---
+ configure.pri | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.pri b/configure.pri
+index ea48255..0699701 100644
+--- a/configure.pri
++++ b/configure.pri
+@@ -796,10 +796,10 @@ defineTest(qtConfOutput_preparePaths) {
+ "static const char qt_configure_installation [12+11] = \"qt_instdate=2012-12-20\";" \
+ "" \
+ "/* Installation Info */" \
+- "static const char qt_configure_prefix_path_str [12+256] = \"qt_prfxpath=$$config.input.prefix\";" \
++ "static const char qt_configure_prefix_path_str [12+512] = \"qt_prfxpath=$$config.input.prefix\";" \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
+- "static const char qt_configure_ext_prefix_path_str [12+256] = \"qt_epfxpath=$$config.input.extprefix\";" \
+- "static const char qt_configure_host_prefix_path_str [12+256] = \"qt_hpfxpath=$$config.input.hostprefix\";" \
++ "static const char qt_configure_ext_prefix_path_str [12+512] = \"qt_epfxpath=$$config.input.extprefix\";" \
++ "static const char qt_configure_host_prefix_path_str [12+512] = \"qt_hpfxpath=$$config.input.hostprefix\";" \
+ "$${LITERAL_HASH}endif" \
+ "" \
+ "static const short qt_configure_str_offsets[] = {" \
diff --git a/meta/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch b/meta/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch
new file mode 100644
index 0000000000..2e261b813e
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch
@@ -0,0 +1,25 @@
+From 6cd8e808e0eb8fa26976da66dd3dfdd58c1d026a Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Mon, 24 Oct 2016 09:45:18 +0300
+Subject: [PATCH] Disable all unknown features instead of erroring out
+
+Task-number: QTBUG-56656
+Change-Id: Ib884fe33cac74439f9592b145937f6b75ced8447
+---
+ mkspecs/features/qt_configure.prf | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
+index d5dcda2..501151d 100644
+--- a/mkspecs/features/qt_configure.prf
++++ b/mkspecs/features/qt_configure.prf
+@@ -1251,7 +1251,8 @@ defineReplace(qtConfEvaluateSingleExpression) {
+ error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.")
+ return($$result)
+ }
+- error("Unknown feature object $${feature} in expression '$${1}'.")
++ warning("Unknown feature object $${feature} in expression '$${1}'.")
++ result = false
+ }
+ !qtConfCheckFeature($$feature): \
+ error("Expression '$$1' is accessing non-emitted feature $${feature}.")
diff --git a/meta/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch b/meta/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch
new file mode 100644
index 0000000000..cf1a716f6e
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch
@@ -0,0 +1,63 @@
+From e3fe48be51aa67227ac1b34c01e4c913d82866c2 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@siemens.com>
+Date: Wed, 11 May 2016 15:20:41 +0200
+Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS
+ isn't set
+
+This prevents errors like:
+
+| The imported target "Qt5::Core" references the file
+|
+| "/qmake"
+|
+| but this file does not exist. Possible reasons include:
+
+Which happen if CMake is used without setting OE_QMAKE_PATH_EXTERNAL_HOST_BINS.
+To achieve this a check for OE_QMAKE_PATH_EXTERNAL_HOST_BINS is added to each Qt5*Config.cmake
+file. And in the case where the variable is not set we just return which is basically
+equal to telling CMake that Qt5 wasn't found.
+
+Upstream-Status: Pending
+ The patch only makes sense in connection with other patches included here.
+ Specifically this are:
+ - 0003-Add-external-hostbindir-option.patch
+ - 0010-Add-external-hostbindir-option-for-native-sdk.patch
+
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+---
+ mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 5 +++++
+ src/corelib/Qt5Config.cmake.in | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+index 55c74aa..f9ec328 100644
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+@@ -9,6 +9,11 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
+ endif()
+ !!ENDIF
+
++if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS)
++ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined")
++ return()
++endif()
++
+ !!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
+ !!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in
+index 75b5348..ed31888 100644
+--- a/src/corelib/Qt5Config.cmake.in
++++ b/src/corelib/Qt5Config.cmake.in
+@@ -3,6 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 2.8.9)
+ message(FATAL_ERROR \"Qt5 requires at least CMake version 2.8.9\")
+ endif()
+
++if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS)
++ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined")
++ return()
++endif()
++
+ if (NOT Qt5_FIND_COMPONENTS)
+ set(Qt5_NOT_FOUND_MESSAGE \"The Qt5 package requires at least one component\")
+ set(Qt5_FOUND False)
diff --git a/meta/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch b/meta/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch
new file mode 100644
index 0000000000..fd9a9e5a56
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch
@@ -0,0 +1,25 @@
+From efaae3535a1ac006ec1b3003258b83d905265fd3 Mon Sep 17 00:00:00 2001
+From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+Date: Wed, 7 Jun 2017 21:00:49 +0900
+Subject: [PATCH] Delete qlonglong and qulonglong
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+---
+ tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
+index 09458bd..59a120e 100644
+--- a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
++++ b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
+@@ -5,10 +5,8 @@ SUBDIRS=\
+ char32_t \
+ int \
+ long \
+- qlonglong \
+ qptrdiff \
+ quintptr \
+- qulonglong \
+ schar \
+ short \
+ uchar \
diff --git a/meta/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch b/meta/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
new file mode 100644
index 0000000000..81269d2e87
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
@@ -0,0 +1,60 @@
+From d79fecb4e8d2040efdc295d06c5e24bdf3cf6b60 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 Jul 2017 08:02:51 -0700
+Subject: [PATCH] Replace pthread_yield with sched_yield
+
+On Linux pthead_yield is same as sched_yield implementation wise
+and sched_yield is available on all libc
+implementations on Linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 4 ++--
+ tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 5 +++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+index 076610a..cb8431f 100644
+--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
++++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+@@ -34,7 +34,7 @@
+ #include "tst_qvariant_common.h"
+
+ #ifdef Q_OS_LINUX
+-# include <pthread.h>
++# include <sched.h>
+ #endif
+
+ #include <algorithm>
+@@ -199,7 +199,7 @@ protected:
+ const char *nm = name.constData();
+ int tp = qRegisterMetaType<Bar>(nm);
+ #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
+- pthread_yield();
++ sched_yield();
+ #endif
+ QMetaType info(tp);
+ if (!info.isValid()) {
+diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+index e45eda2..e64f329 100644
+--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
++++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+@@ -78,6 +78,7 @@
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <sched.h>
+ #endif
+
+ #include "private/qhostinfo_p.h"
+@@ -2136,8 +2137,8 @@ public slots:
+
+ #if defined(Q_OS_MAC)
+ pthread_yield_np();
+-#elif defined Q_OS_LINUX && !defined Q_OS_ANDROID
+- pthread_yield();
++#elif defined Q_OS_LINUX
++ sched_yield();
+ #endif
+ if (!sock->waitForConnected()) {
+ networkTimeout = true;
diff --git a/meta/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch b/meta/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch
new file mode 100644
index 0000000000..c210d644b6
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch
@@ -0,0 +1,69 @@
+From aaeadb4326f1f9df7bbafa0b9fa6937504a1c035 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Sep 2017 09:11:44 -0700
+Subject: [PATCH] Add OE specific specs for clang compiler
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mkspecs/linux-oe-clang/qmake.conf | 43 ++++++++++++++++++++++++++++++++++
+ mkspecs/linux-oe-clang/qplatformdefs.h | 1 +
+ 2 files changed, 44 insertions(+)
+ create mode 100644 mkspecs/linux-oe-clang/qmake.conf
+ create mode 100644 mkspecs/linux-oe-clang/qplatformdefs.h
+
+diff --git a/mkspecs/linux-oe-clang/qmake.conf b/mkspecs/linux-oe-clang/qmake.conf
+new file mode 100644
+index 0000000..ffc9f05
+--- /dev/null
++++ b/mkspecs/linux-oe-clang/qmake.conf
+@@ -0,0 +1,43 @@
++#
++# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
++#
++
++MAKEFILE_GENERATOR = UNIX
++CONFIG += incremental
++QMAKE_INCREMENTAL_STYLE = sublib
++
++include(../common/linux.conf)
++
++# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
++QMAKE_AR = $$(OE_QMAKE_AR) cqs
++QMAKE_STRIP = $$(OE_QMAKE_STRIP)
++QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER)
++
++include(../common/gcc-base-unix.conf)
++
++# *FLAGS from gcc-base.conf
++QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS)
++QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS)
++QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS)
++
++include(../common/clang.conf)
++
++# tc settings from g++-base.conf
++QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) clang
++QMAKE_CC = $$(OE_QMAKE_CC)
++QMAKE_CXX = $$(OE_QMAKE_CXX)
++
++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS)
++
++QMAKE_LINK = $$(OE_QMAKE_LINK)
++QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK)
++
++# for the SDK
++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG)
++
++include(../oe-device-extra.pri)
++
++load(device_config)
++load(qt_config)
+diff --git a/mkspecs/linux-oe-clang/qplatformdefs.h b/mkspecs/linux-oe-clang/qplatformdefs.h
+new file mode 100644
+index 0000000..880c927
+--- /dev/null
++++ b/mkspecs/linux-oe-clang/qplatformdefs.h
+@@ -0,0 +1 @@
++#include "../linux-clang/qplatformdefs.h"
diff --git a/meta/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch b/meta/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch
new file mode 100644
index 0000000000..5fed2ff891
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch
@@ -0,0 +1,32 @@
+From 7c7545fc64e78b2a4a411aa392df6f424ee27c5a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Sep 2017 09:44:48 -0700
+Subject: [PATCH] linux-clang: Invert conditional for defining QT_SOCKLEN_T
+
+This helps to make sure that QT_SOCKLEN_T is defined to be 'int'
+only when its glibc < 2 and not for other libcswhich may define
+it as per standards but are not glibc, e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mkspecs/linux-clang/qplatformdefs.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
+index d29225f..a0cdb57 100644
+--- a/mkspecs/linux-clang/qplatformdefs.h
++++ b/mkspecs/linux-clang/qplatformdefs.h
+@@ -84,10 +84,10 @@
+
+ #undef QT_SOCKLEN_T
+
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
++#if defined(__GLIBC__) && (__GLIBC__ < 2)
+ #define QT_SOCKLEN_T int
++#else
++#define QT_SOCKLEN_T socklen_t
+ #endif
+
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
diff --git a/meta/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch b/meta/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch
new file mode 100644
index 0000000000..a0aaa520ee
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch
@@ -0,0 +1,25 @@
+From ba70f3ca46d921c20bebb5cb9d4b41e64bd02d8b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Sep 2017 10:11:50 -0700
+Subject: [PATCH] tst_qlocale: Enable QT_USE_FENV only on glibc
+
+musl does not have feenableexcept function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+index d424e60..3eae828 100644
+--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
++++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+@@ -46,7 +46,7 @@
+ #include <private/qlocale_tools_p.h>
+ #include <qnumeric.h>
+
+-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
++#if defined(Q_OS_LINUX) && defined(__GLIBC__)
+ # define QT_USE_FENV
+ #endif
+
diff --git a/meta/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch b/meta/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch
new file mode 100644
index 0000000000..fe1fcf57ae
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch
@@ -0,0 +1,33 @@
+From 81fc64f7f3a8b0554fd8d1b96b113bc04b5f0b5c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 14 Feb 2018 17:08:43 -0800
+Subject: [PATCH] mkspecs/common/gcc-base.conf: Use -I instead of -isystem
+
+-isystem fails to build when code uses include_next on certain files e.g.
+
+qtbase/5.10.0+gitAUTOINC+50117d738a-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
+ #include_next <stdlib.h>
+ ^~~~~~~~~~
+compilation terminated.
+make[2]: *** [Makefile:11592: .obj/qgenericpluginfactory.o] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mkspecs/common/gcc-base.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index 234f71d..ee3da02 100644
+--- a/mkspecs/common/gcc-base.conf
++++ b/mkspecs/common/gcc-base.conf
+@@ -46,7 +46,7 @@ QMAKE_CFLAGS_DEBUG += -g
+ QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
+ QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
+ QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
+-QMAKE_CFLAGS_ISYSTEM = -isystem
++QMAKE_CFLAGS_ISYSTEM = -I
+ QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+ QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+ QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
diff --git a/meta/recipes-qt/qt5/qtbase/0013-Always-build-uic-and-qvkgen.patch b/meta/recipes-qt/qt5/qtbase/0013-Always-build-uic-and-qvkgen.patch
new file mode 100644
index 0000000000..3d40515f1a
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0013-Always-build-uic-and-qvkgen.patch
@@ -0,0 +1,28 @@
+From 2ea3a1612452f1dc9c2febb4ae610194f67e39d6 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 16 Nov 2013 00:32:30 +0100
+Subject: [PATCH] Always build uic and qvkgen
+
+Even if we are not building gui or widgets. This tool is needed later
+as a native tool when compiling the target.
+
+Change-Id: I257668ac28c22b192e7ec7736e6c23fa3be6bab6
+Signed-off-by: Mikko Levonmaa <mikko.levonmaa@palm.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/src.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/src.pro b/src/src.pro
+index a73729a..c7668b5 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -213,7 +213,7 @@ qtConfig(gui) {
+ }
+ }
+ }
+-SUBDIRS += src_plugins
++SUBDIRS += src_plugins src_tools_uic src_tools_qvkgen
+
+ nacl: SUBDIRS -= src_network src_testlib
+
diff --git a/meta/recipes-qt/qt5/qtbase/0014-Bootstrap-without-linkat-feature.patch b/meta/recipes-qt/qt5/qtbase/0014-Bootstrap-without-linkat-feature.patch
new file mode 100644
index 0000000000..c733c1566d
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/0014-Bootstrap-without-linkat-feature.patch
@@ -0,0 +1,27 @@
+From 77365eda4dd1c4c26803b3f0d1f411b7416ad531 Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Fri, 24 Nov 2017 15:16:31 +0200
+Subject: [PATCH] Bootstrap without linkat feature
+
+qmake does not work together with pseudo when unnamed temporary files
+are used with linkat.
+
+Upstream-Status: Inappropriate [OE specific]
+[YOCTO #11996]
+---
+ src/corelib/global/qconfig-bootstrapped.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
+index dabb715..5b4ff86 100644
+--- a/src/corelib/global/qconfig-bootstrapped.h
++++ b/src/corelib/global/qconfig-bootstrapped.h
+@@ -88,7 +88,7 @@
+ #define QT_FEATURE_futimes -1
+ #define QT_FEATURE_library -1
+ #ifdef __linux__
+-# define QT_FEATURE_linkat 1
++# define QT_FEATURE_linkat -1
+ #else
+ # define QT_FEATURE_linkat -1
+ #endif
diff --git a/meta/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake b/meta/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake
new file mode 100644
index 0000000000..6f0042b251
--- /dev/null
+++ b/meta/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake
@@ -0,0 +1 @@
+set( OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS} )