aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2017-09-15 08:24:43 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2017-09-15 11:45:21 +0000
commit81831558b4dfdeb5030d6519f29d9ce122a434ce (patch)
treebd851a5b2f992ddded813f8cdcaf8bdf8e9a0bc7 /classes
parent95440484a0fe59f19ae49edeaf32bcde5cdfc5bf (diff)
sdk: fix host_build QT_ARCH
mkpecs/qconfig.pri defines QT_ARCH and QT_BUILDARCH separately for host_build and target build and both of these were always set to target architecture. This cause issues in the SDK, if component tried to build host tools using these values, which qtwebengine does. Fixed now, so that the host_build variants are taken from the nativesdk's mkspecs/qconfig.pri. Task-number: QTBUG-63155 Change-Id: I44644c97d634dac6297e28cc851fc31f7eaf1f90 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'classes')
-rw-r--r--classes/populate_b2qt_qt5_sdk.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/classes/populate_b2qt_qt5_sdk.bbclass b/classes/populate_b2qt_qt5_sdk.bbclass
index fd7b43c4..453d94e7 100644
--- a/classes/populate_b2qt_qt5_sdk.bbclass
+++ b/classes/populate_b2qt_qt5_sdk.bbclass
@@ -30,6 +30,7 @@
inherit populate_b2qt_sdk populate_sdk_qt5_base abi-arch siteinfo
SDK_MKSPEC_DIR = "${SDK_OUTPUT}${SDKTARGETSYSROOT}${libdir}/${QT_DIR_NAME}/mkspecs"
+NATIVE_SDK_MKSPEC_DIR = "${SDK_OUTPUT}${SDKPATHNATIVE}${libdir}/${QT_DIR_NAME}/mkspecs"
SDK_MKSPEC = "devices/linux-oe-generic-g++"
SDK_DEVICE_PRI = "${SDK_MKSPEC_DIR}/qdevice.pri"
SDK_DYNAMIC_FLAGS = "-O. -pipe -g"
@@ -66,6 +67,14 @@ EOF
echo 'HostSpec = linux-g++' >> $qtconf
echo 'TargetSpec = devices/linux-oe-generic-g++' >> $qtconf
+ # Update correct host_build ARCH and ABI to mkspecs/qconfig.pri
+ QT_ARCH=$(grep QT_ARCH ${NATIVE_SDK_MKSPEC_DIR}/qconfig.pri | tail -1)
+ QT_BUILDABI=$(grep QT_BUILDABI ${NATIVE_SDK_MKSPEC_DIR}/qconfig.pri | tail -1)
+
+ sed -e "0,/QT_ARCH/s/^.*QT_ARCH.*/$QT_ARCH/" \
+ -e "0,/QT_BUILDABI/s/^.*QT_BUILDABI.*/$QT_BUILDABI/" \
+ -i ${SDK_MKSPEC_DIR}/qconfig.pri
+
create_qtcreator_configure_script
# Link /etc/resolv.conf is broken in the toolchain sysroot, remove it