summaryrefslogtreecommitdiffstats
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
parent6d919b0bf1ede1d585a6a198257d9e01cf01bd94 (diff)
downloadmeta-qt5-cb1b47212659a21514553cb0a0102861a6e2299b.tar.gz
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>
-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 += " \
171 ${PACKAGECONFIG_CONFARGS} \ 171 ${PACKAGECONFIG_CONFARGS} \
172" 172"
173 173
174export CC_host_toolchain-clang = "clang"
175export CXX_host_toolchain-clang = "clang++"
176export LD_host_toolchain-clang = "clang++"
177export CC_host ?= "gcc"
178export CXX_host ?= "g++"
179export LD_host ?= "g++"
180
174# for qtbase configuration we need default settings 181# for qtbase configuration we need default settings
175# since we cannot set empty set filename to a not existent file 182# since we cannot set empty set filename to a not existent file
176deltask generate_qt_config_file 183deltask generate_qt_config_file
@@ -249,6 +256,9 @@ do_install_append() {
249 echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf 256 echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
250 echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf 257 echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf
251 echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf 258 echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf
259 echo "isEmpty(CC_host): CC_host = ${CC_host}" >> $conf
260 echo "isEmpty(CXX_host): CXX_host = ${CXX_host}" >> $conf
261 echo "isEmpty(LD_host): LD_host = ${LD_host}" >> $conf
252 262
253 generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf 263 generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf
254 264