diff options
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch')
| -rw-r--r-- | recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch b/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch new file mode 100644 index 00000000..772197f1 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | From 13db17d0281ed7e0aaeeafb0f6caa6b0b6fb97af Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | ||
| 3 | Date: Wed, 15 Mar 2017 13:53:28 +0200 | ||
| 4 | Subject: [PATCH] Force host toolchain configuration | ||
| 5 | |||
| 6 | Force gcc/g++ to be used for parts using host toolchain, since | ||
| 7 | the option(host_build) does not work in yocto builds. | ||
| 8 | |||
| 9 | Don't use QT_ARCH for the host architecture, since that's always | ||
| 10 | the target architecture in bitbake builds, instead ask specifically | ||
| 11 | for the qmakes's host architecture. | ||
| 12 | |||
| 13 | Upstream-Status: Inappropriate [OE specific] | ||
| 14 | Signed-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 | |||
| 20 | diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro | ||
| 21 | index dd0d3e3..70161c8 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 = { " \ | ||
| 59 | diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri | ||
| 60 | index 6f7b27f..1b9434b 100644 | ||
| 61 | --- a/src/core/config/linux.pri | ||
| 62 | +++ b/src/core/config/linux.pri | ||
| 63 | @@ -91,7 +91,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 | ||
