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