From f430c2c9b3d38f9150588da6dc154aa2285584e6 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] chromium: 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.

Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 gn/build/gen.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gn/build/gen.py b/gn/build/gen.py
index 87db4c26bcf..34c853b7f4a 100755
--- a/gn/build/gen.py
+++ b/gn/build/gen.py
@@ -310,10 +310,10 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot):
     ld = os.environ.get('LD', 'g++')
     ar = os.environ.get('AR', 'ar -X64')
   else:
-    cc = os.environ.get('CC', 'cc')
-    cxx = os.environ.get('CXX', 'c++')
+    cc = os.environ.get('CC_host', 'gcc')
+    cxx = os.environ.get('CXX_host', 'g++')
     ld = cxx
-    ar = os.environ.get('AR', 'ar')
+    ar = os.environ.get('AR_host', 'ar')
 
   # QTBUG-64759
   # cflags = os.environ.get('CFLAGS', '').split()
