Files
tqma6-yocto-mirror/sources/meta-qt6/recipes-qt/qt6/qtwebengine/0001-CMake-use-generated-yocto-toolchains.patch

63 lines
2.4 KiB
Diff
Raw Normal View History

From efa68fdedbec60380946f69a6a2f985958148e83 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Wed, 18 Aug 2021 15:09:41 +0300
Subject: [PATCH] CMake: use generated yocto toolchains
Bitbake knows how to generate working toolchains, use those instead of
ones done by webengine. No need to use separate host pkg-wrapper with
these toolchain. No need to do separate host build, we'll use the
target binaries where needed.
Upstream-Status: Inappropriate [embedded specific]
Change-Id: I217c9122144f25bb2d28717e7248c2a51b149127
---
cmake/Functions.cmake | 12 +++++-------
src/CMakeLists.txt | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 3371e5ff5..ac889d3f7 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -825,7 +825,7 @@ endfunction()
macro(create_pkg_config_host_wrapper buildDir)
find_package(PkgConfigHost)
- if(CMAKE_CROSSCOMPILING)
+ if(FALSE)
create_pkg_config_wrapper("${buildDir}/pkg-config-host_wrapper.sh" "${PKG_CONFIG_HOST_EXECUTABLE}")
set(PKG_CONFIG_HOST_EXECUTABLE "${buildDir}/pkg-config-host_wrapper.sh")
endif()
@@ -1097,14 +1097,12 @@ macro(append_toolchain_setup)
elseif(LINUX)
get_gn_arch(cpu ${TEST_architecture_arch})
list(APPEND gnArgArg
- custom_toolchain="${buildDir}/target_toolchain:target"
- host_toolchain="${buildDir}/host_toolchain:host"
+ custom_toolchain="//build/toolchain/yocto:yocto_target"
+ host_toolchain="//build/toolchain/yocto:yocto_native"
+ v8_snapshot_toolchain="//build/toolchain/yocto:yocto_target"
)
if(CMAKE_CROSSCOMPILING)
- list(APPEND gnArgArg
- v8_snapshot_toolchain="${buildDir}/v8_toolchain:v8"
- target_cpu="${cpu}"
- )
+ list(APPEND gnArgArg target_cpu="${cpu}")
else()
list(APPEND gnArgArg host_cpu="${cpu}")
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0084697f2..1c9059ae6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -161,7 +161,7 @@ endif()
# HOST PROJECT
##
-if(CMAKE_CROSSCOMPILING AND NOT IOS AND NOT MACOS)
+if(FALSE)
if(NOT Gn_FOUND)
message(FATAL_ERROR "\nHost gn not found - cross compilation not possible")