From a143fbcac5a77cf03ca9f11eea9cbb95132b35cd Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 17 Dec 2018 16:35:55 +0200 Subject: Use ABI flavor with QtCreator QtCreator 4.8 allows adding new ABI flavors that can be used to differentiate otherwise identical tools. Using our own abi flavor prevents QtCreator from mixing incompatible tools with one from yocto toolchain. Task-number: QTAUTO-793 Change-Id: Ibba6e42b25e404aff2a20a021fe7833455f0de9b Reviewed-by: Mikko Gronoff --- meta-boot2qt/classes/populate_b2qt_qt5_sdk.bbclass | 2 +- meta-boot2qt/classes/qbsp.bbclass | 3 ++- meta-boot2qt/files/configure-qtcreator.sh | 6 +++++- meta-boot2qt/files/qbsp/toolchain_installscript.qs | 8 +++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/meta-boot2qt/classes/populate_b2qt_qt5_sdk.bbclass b/meta-boot2qt/classes/populate_b2qt_qt5_sdk.bbclass index f35ebfe..6278d11 100644 --- a/meta-boot2qt/classes/populate_b2qt_qt5_sdk.bbclass +++ b/meta-boot2qt/classes/populate_b2qt_qt5_sdk.bbclass @@ -91,7 +91,7 @@ create_qtcreator_configure_script () { # add qtcreator configuration script install -m 0755 ${B2QTBASE}/files/configure-qtcreator.sh ${SDK_OUTPUT}/${SDKPATH} sed -i -e '/^CONFIG=/c\CONFIG="${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"' ${SDK_OUTPUT}/${SDKPATH}/configure-qtcreator.sh - sed -i -e '/^ABI=/c\ABI="${ABI}-linux-generic-elf-${SITEINFO_BITS}bit"' ${SDK_OUTPUT}/${SDKPATH}/configure-qtcreator.sh + sed -i -e '/^ABI=/c\ABI="${ABI}-linux-poky-elf-${SITEINFO_BITS}bit"' ${SDK_OUTPUT}/${SDKPATH}/configure-qtcreator.sh } create_qtcreator_configure_script_sdkmingw32 () { diff --git a/meta-boot2qt/classes/qbsp.bbclass b/meta-boot2qt/classes/qbsp.bbclass index fbfd266..d61e12b 100644 --- a/meta-boot2qt/classes/qbsp.bbclass +++ b/meta-boot2qt/classes/qbsp.bbclass @@ -27,7 +27,7 @@ ## ############################################################################ -inherit meta nopackages abi-arch +inherit meta nopackages abi-arch siteinfo FILESEXTRAPATHS_prepend := "${B2QTBASE}/files/qbsp:" @@ -87,6 +87,7 @@ patch_installer_files() { -e "s#@SYSROOT@#${REAL_MULTIMACH_TARGET_SYS}#" \ -e "s#@TARGET_SYS@#${TARGET_SYS}#" \ -e "s#@ABI@#${ABI}#" \ + -e "s#@BITS@#${SITEINFO_BITS}#" \ -e "s#@INSTALLPATH@#${QBSP_INSTALL_PATH}#" \ -e "s#@SDKPATH@#${SDKPATH}#" \ -e "s#@SDKFILE@#${SDK_NAME}#" \ diff --git a/meta-boot2qt/files/configure-qtcreator.sh b/meta-boot2qt/files/configure-qtcreator.sh index a7ea288..6899fc3 100755 --- a/meta-boot2qt/files/configure-qtcreator.sh +++ b/meta-boot2qt/files/configure-qtcreator.sh @@ -30,7 +30,7 @@ set -e -ABI="arm-linux-generic-elf-32bit" +ABI="arm-linux-poky-elf-32bit" CONFIG="" printUsage () @@ -107,6 +107,10 @@ if [ -n "${REMOVEONLY}" ]; then exit 0 fi +${SDKTOOL} addAbiFlavor \ + --flavor poky \ + --oses linux || true + ${SDKTOOL} addTC \ --id "ProjectExplorer.ToolChain.Gcc:${BASEID}.gcc" \ --name "GCC (${NAME})" \ diff --git a/meta-boot2qt/files/qbsp/toolchain_installscript.qs b/meta-boot2qt/files/qbsp/toolchain_installscript.qs index 8de238b..32c14e0 100644 --- a/meta-boot2qt/files/qbsp/toolchain_installscript.qs +++ b/meta-boot2qt/files/qbsp/toolchain_installscript.qs @@ -40,7 +40,7 @@ Component.prototype.createOperations = function() var sysroot = "@SYSROOT@" var target_sys = "@TARGET_SYS@" var target = "@TARGET@" - var abi = "@ABI@" + var abi = "@ABI@-linux-poky-elf-@BITS@bit" var installPath = "@INSTALLPATH@/toolchain" var sdkPath = "@SDKPATH@" var sdkFile = "@SDKFILE@" @@ -76,6 +76,11 @@ Component.prototype.createOperations = function() cmakeGenerator = "MinGW Makefiles"; } + component.addOperation("Execute", "{0,2}", + ["@SDKToolBinary@", "addAbiFlavor", + "--flavor", "poky", + "--oses", "linux"]); + component.addOperation("Execute", ["@SDKToolBinary@", "addTC", "--id", toolchainId + ".gcc", @@ -112,6 +117,7 @@ Component.prototype.createOperations = function() "--name", platform + " " + target, "--type", "Qdb.EmbeddedLinuxQt", "--qmake", path + "/sysroots/" + hostSysroot + "/usr/bin/qmake" + executableExt, + "--abis", abi, "UNDOEXECUTE", "@SDKToolBinary@", "rmQt", "--id", qtId]); -- cgit v1.2.3-54-g00ecf