1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
From dbcfd868d551beb55a9411c26912050ea278ec48 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Wed, 15 Mar 2017 13:53:28 +0200
Subject: [PATCH] Force host toolchain configuration
Force gcc/g++ to be used for parts using host toolchain, since
the option(host_build) does not work in yocto builds.
Don't use QT_ARCH for the host architecture, since that's always
the target architecture in bitbake builds, instead ask specifically
for the qmakes's host architecture.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
src/buildtools/configure_host.pro | 14 +++++++-------
src/core/config/linux.pri | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro
index f1b3d47..1212372 100644
--- a/src/buildtools/configure_host.pro
+++ b/src/buildtools/configure_host.pro
@@ -4,7 +4,7 @@ TEMPLATE = aux
# Pick up the host toolchain
option(host_build)
-GN_HOST_CPU = $$gnArch($$QT_ARCH)
+GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch)
!isEmpty(QT_TARGET_ARCH): GN_TARGET_CPU = $$gnArch($$QT_TARGET_ARCH)
else: GN_TARGET_CPU = $$GN_HOST_CPU
GN_OS = $$gnOS()
@@ -29,9 +29,9 @@ GN_CONTENTS = \
"import(\"//build/config/sysroot.gni\")" \
"import(\"//build/toolchain/gcc_toolchain.gni\")" \
"gcc_toolchain(\"host\") {" \
-" cc = \"$$which($$QMAKE_CC)\" " \
-" cxx = \"$$which($$QMAKE_CXX)\" " \
-" ld = \"$$which($$QMAKE_LINK)\" " \
+" cc = \"$$which(gcc)\" " \
+" cxx = \"$$which(g++)\" " \
+" ld = \"$$which(g++)\" " \
" ar = \"$$which(ar)\" " \
" nm = \"$$which(nm)\" " \
" toolchain_args = { " \
@@ -42,9 +42,9 @@ GN_CONTENTS = \
" } " \
"}" \
"gcc_toolchain(\"v8_snapshot\") {" \
-" cc = \"$$which($$QMAKE_CC)\" " \
-" cxx = \"$$which($$QMAKE_CXX)\" " \
-" ld = \"$$which($$QMAKE_LINK)\" " \
+" cc = \"$$which(gcc)\" " \
+" cxx = \"$$which(g++)\" " \
+" ld = \"$$which(g++)\" " \
" ar = \"$$which(ar)\" " \
" nm = \"$$which(nm)\" " \
" toolchain_args = { " \
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index 831e195..8a28de5 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -98,7 +98,7 @@ contains(QT_ARCH, "mips") {
host_build {
gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\"
- GN_HOST_CPU = $$gnArch($$QT_ARCH)
+ GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch)
gn_args += host_cpu=\"$$GN_HOST_CPU\"
# Don't bother trying to use system libraries in this case
gn_args += use_glib=false
|