From f0fc1606d5b6d2adde30971c0a0ea2495fccd85a Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Wed, 29 Mar 2017 12:14:07 +0200
Subject: [PATCH] Do not set arm/misp specific gn args for host_build

Self build of gn ends with error on embedded builds.

Change-Id: I669c61eef7107919dbe11cdb558cf6ae0499621c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 src/core/config/linux.pri | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index 84ce73bfa..24951cd07 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -41,7 +41,7 @@ cross_compile:!host_build {
     !isEmpty(TOOLCHAIN_SYSROOT): gn_args += target_sysroot=\"$${TOOLCHAIN_SYSROOT}\"
 }
 
-contains(QT_ARCH, "arm") {
+contains(QT_ARCH, "arm"):!host_build {
     # Extract ARM specific compiler options that we have to pass to gn,
     # but let gn figure out a default if an option is not present.
     MTUNE = $$extractCFlag("-mtune=.*")
@@ -78,7 +78,7 @@ contains(QT_ARCH, "arm") {
     else: contains(QMAKE_CFLAGS, "-mthumb"): gn_args += arm_use_thumb=true
 }
 
-contains(QT_ARCH, "mips") {
+contains(QT_ARCH, "mips"):!host_build {
     MARCH = $$extractCFlag("-march=.*")
     !isEmpty(MARCH) {
         equals(MARCH, "mips32r6"): gn_args += mips_arch_variant=\"r6\"
-- 
GitLab