summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-06-19 00:57:51 -0400
committerMike Gilbert <floppym@gentoo.org>2017-06-19 01:01:05 -0400
commit2dd4eba091de610ed6621df0b20daedc7c5c44c2 (patch)
tree0cdff38e380bb7d2a8b06a76adc662821d84c03b /www-client/chromium/files
parentmedia-video/totem: remove old (diff)
downloadgentoo-2dd4eba091de610ed6621df0b20daedc7c5c44c2.tar.gz
gentoo-2dd4eba091de610ed6621df0b20daedc7c5c44c2.tar.bz2
gentoo-2dd4eba091de610ed6621df0b20daedc7c5c44c2.zip
www-client/chromium: wire-up cross-compile support
Cross-compiling still does not work, but this gets us closer. - Build GN with the host (CBUILD) compiler, skip rebuild after bootstrap. - Add a toolchain definition for the host (CBUILD) compiler. - Set the host_toolchain option. - Set the target_cpu option based on the target arch (CHOST). The host_toolchain option is also set for native builds. This makes clang work without setting clang_base_path. Package-Manager: Portage-2.3.6_p7, Repoman-2.3.2_p75
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/toolchain/BUILD.gn18
1 files changed, 18 insertions, 0 deletions
diff --git a/www-client/chromium/files/toolchain/BUILD.gn b/www-client/chromium/files/toolchain/BUILD.gn
index 78f7b57e3be5..f88d3afdcfda 100644
--- a/www-client/chromium/files/toolchain/BUILD.gn
+++ b/www-client/chromium/files/toolchain/BUILD.gn
@@ -17,3 +17,21 @@ gcc_toolchain("default") {
current_os = current_os
}
}
+
+gcc_toolchain("host") {
+ cc = getenv("BUILD_CC")
+ cxx = getenv("BUILD_CXX")
+ ar = getenv("BUILD_AR")
+ nm = getenv("BUILD_NM")
+ ld = cxx
+
+ extra_cflags = getenv("BUILD_CFLAGS")
+ extra_cppflags = getenv("BUILD_CPPFLAGS")
+ extra_cxxflags = getenv("BUILD_CXXFLAGS")
+ extra_ldflags = getenv("BUILD_LDFLAGS")
+
+ toolchain_args = {
+ current_cpu = current_cpu
+ current_os = current_os
+ }
+}