aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase_git.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-03 16:01:44 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2019-02-14 17:40:27 +0000
commitcb1b47212659a21514553cb0a0102861a6e2299b (patch)
treeb8438df62790860dee4978bbca3a51359d8ef9d7 /recipes-qt/qt5/qtbase_git.bb
parent6d919b0bf1ede1d585a6a198257d9e01cf01bd94 (diff)
qtbase: Export host compiler and linker
Certain portions of qtwebengine build involves building native tools using host compiler/linker, this however currently uses gcc and when we build with clang to compile the target pieces, chromium configures for clang and rightly so, but then does not have a way to define flags for host and target separately, and it ends up supplying same flags for both host and target builds, the trouble is that the options between clang and gcc are not always same in some cases, they dont understand each others options. So build starts to fail due to these errors about unknown cmdline options. This makes sure we inject CC_host, CXX_host, LD_host into qmake.conf so they can be used in such packages We use clang to do host builds when TOOLCHAIN = "clang" is used otherwise default to gcc as it was the case Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase_git.bb')
-rw-r--r--recipes-qt/qt5/qtbase_git.bb10
1 files changed, 10 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 6d1c7d2d..adf0a43c 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -171,6 +171,13 @@ QT_CONFIG_FLAGS += " \
${PACKAGECONFIG_CONFARGS} \
"
+export CC_host_toolchain-clang = "clang"
+export CXX_host_toolchain-clang = "clang++"
+export LD_host_toolchain-clang = "clang++"
+export CC_host ?= "gcc"
+export CXX_host ?= "g++"
+export LD_host ?= "g++"
+
# for qtbase configuration we need default settings
# since we cannot set empty set filename to a not existent file
deltask generate_qt_config_file
@@ -249,6 +256,9 @@ do_install_append() {
echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf
echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf
+ echo "isEmpty(CC_host): CC_host = ${CC_host}" >> $conf
+ echo "isEmpty(CXX_host): CXX_host = ${CXX_host}" >> $conf
+ echo "isEmpty(LD_host): LD_host = ${LD_host}" >> $conf
generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf