From b6a93fbdb6074d7578904a69c7ce6adeff38481f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 9 Jun 2022 07:51:07 +0000 Subject: [PATCH] ptest: fix build issue with qtbase tests ptest build had a subtle problem with qtbase where it was using Qt6BuildInternals package from native sysroot instead of the target install path. This could add compiler flags that were not supported for the target architecture: cc1plus: error: '-fcf-protection=full' is not supported for this target QT_ADDITIONAL_PACKAGES_PREFIX_PATH is not used in qtbase/CMakeLists.txt: find_package(Qt6 REQUIRED COMPONENTS BuildInternals CMAKE_FIND_ROOT_PATH_BOTH) so the current approach for using Qt from the install path was not working. Change the ptest build from using QT_ADDITIONAL_PACKAGES_PREFIX_PATHs to using separate cmake toolchain file that prepends the install path to CMAKE_FIND_ROOT_PATH, which makes CMake find the target Qt packages correctly. Pick-to: 6.4 6.3 6.2 Change-Id: Idc99a26577886208b85bafe811f61538bb38d5bc Reviewed-by: Alexandru Croitor --- recipes-qt/qt6/qt6-ptest.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes-qt/qt6/qt6-ptest.inc b/recipes-qt/qt6/qt6-ptest.inc index 0aa1288..0395472 100644 --- a/recipes-qt/qt6/qt6-ptest.inc +++ b/recipes-qt/qt6/qt6-ptest.inc @@ -7,6 +7,11 @@ QT_PTEST_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', PTEST_ENABLED = "${QT_PTEST_ENABLED}" fakeroot do_install_ptest() { + cat >${WORKDIR}/toolchain-ptest.cmake <