From 81831558b4dfdeb5030d6519f29d9ce122a434ce Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 15 Sep 2017 08:24:43 +0300 Subject: 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 --- classes/populate_b2qt_qt5_sdk.bbclass | 9 +++++++++ .../nativesdk-packagegroup-b2qt-embedded-qt5-toolchain-host.bb | 1 + 2 files changed, 10 insertions(+) diff --git a/classes/populate_b2qt_qt5_sdk.bbclass b/classes/populate_b2qt_qt5_sdk.bbclass index fd7b43c..453d94e 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 diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt5-toolchain-host.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt5-toolchain-host.bb index a65435f..c3f07b8 100644 --- a/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt5-toolchain-host.bb +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-b2qt-embedded-qt5-toolchain-host.bb @@ -43,6 +43,7 @@ RDEPENDS_${PN} += "\ nativesdk-packagegroup-b2qt-embedded-toolchain-host \ nativesdk-qttools-tools \ nativesdk-qtbase-tools \ + nativesdk-qtbase-tools-dev \ nativesdk-qtbase-tools-staticdev \ nativesdk-qtdeclarative-tools \ nativesdk-qtdeclarative-staticdev \ -- cgit v1.2.3-54-g00ecf