From a9b04a9324cc9962e009c201593d2e1963f69aef Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 18 Jan 2023 09:38:07 +0000 Subject: qbsp: add mkspec to container toolchain kit QtCreator has been fixed, so mkspec can be added also to container toolchain. Also use empty build device for non-container toolchain, which defaults to desktop device. This allows simpler installer script to be maintained. Change-Id: I249b8ee56fc4e4600c85c668ae2addf33c4c2686 Reviewed-by: Mikko Gronoff (cherry picked from commit 5e92c0eaf453885ae0958bc48845732a76bab528) --- meta-boot2qt/files/qbsp/toolchain_installscript.qs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/meta-boot2qt/files/qbsp/toolchain_installscript.qs b/meta-boot2qt/files/qbsp/toolchain_installscript.qs index 5e0c9677..d3c87bec 100644 --- a/meta-boot2qt/files/qbsp/toolchain_installscript.qs +++ b/meta-boot2qt/files/qbsp/toolchain_installscript.qs @@ -162,7 +162,9 @@ RUN sh *.sh -d /opt/toolchain -y && rm *.sh\n"); "UNDOEXECUTE", "@SDKToolBinary@", "rmCMake", "--id", component.name]); + var deviceId = ""; if (container) { + deviceId = component.name; component.addOperation("Execute", ["@SDKToolBinary@", "addDev", "--id", component.name, @@ -177,14 +179,16 @@ RUN sh *.sh -d /opt/toolchain -y && rm *.sh\n"); "@SDKToolBinary@", "rmDev", "--id", component.name]); } - var addKitOperations = + component.addOperation("Execute", ["@SDKToolBinary@", "addKit", "--id", component.name, "--name", platform, + "--mkspec", "linux-oe-g++", "--qt", component.name, "--debuggerid", component.name, "--sysroot", dockerPrefix + path + "/sysroots/" + sysroot, "--devicetype", "QdbLinuxOsType", + "--builddevice", deviceId, "--Ctoolchain", toolchainId + ".gcc", "--Cxxtoolchain", toolchainId + ".g++", "--cmake", component.name, @@ -194,17 +198,9 @@ RUN sh *.sh -d /opt/toolchain -y && rm *.sh\n"); "--cmake-config", "CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}", "--cmake-config", "QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}", "--cmake-config", "CMAKE_TOOLCHAIN_FILE:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/lib/cmake/Qt6/qt.toolchain.cmake", - "--cmake-config", "CMAKE_MAKE_PROGRAM:FILEPATH=" + path + "/sysroots/"+ hostSysroot + "/usr/bin/ninja" + executableExt]; - - if (container) { - addKitOperations.push("--builddevice", component.name); - } - if (!container) { - addKitOperations.push("--mkspec", "linux-oe-g++"); - } - - addKitOperations.push("UNDOEXECUTE", "@SDKToolBinary@", "rmKit", "--id", component.name); - component.addOperation("Execute", addKitOperations); + "--cmake-config", "CMAKE_MAKE_PROGRAM:FILEPATH=" + path + "/sysroots/"+ hostSysroot + "/usr/bin/ninja" + executableExt, + "UNDOEXECUTE", + "@SDKToolBinary@", "rmKit", "--id", component.name]); if (container) { var settingsFile = installer.value("QtCreatorInstallerSettingsFile"); -- cgit v1.2.3