commit:     d6ba7bef53246b8132d81b5ef0620e32b9fbcb89
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 03:13:40 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Sep 21 02:01:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6ba7bef

www-client/chromium: use custom toolchain for GN builds

Bug: https://bugs.gentoo.org/587408

 www-client/chromium/chromium-55.0.2859.0.ebuild |  3 +++
 www-client/chromium/files/toolchain/BUILD.gn    | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/www-client/chromium/chromium-55.0.2859.0.ebuild 
b/www-client/chromium/chromium-55.0.2859.0.ebuild
index f243234..417fe55 100644
--- a/www-client/chromium/chromium-55.0.2859.0.ebuild
+++ b/www-client/chromium/chromium-55.0.2859.0.ebuild
@@ -536,6 +536,9 @@ src_configure() {
        # Make sure the build system will use the right tools, bug #340795.
        tc-export AR CC CXX NM
 
+       # Define a custom toolchain for GN
+       myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\""
+
        # Tools for building programs to be executed on the build system, bug 
#410883.
        if tc-is-cross-compiler; then
                export AR_host=$(tc-getBUILD_AR)

diff --git a/www-client/chromium/files/toolchain/BUILD.gn 
b/www-client/chromium/files/toolchain/BUILD.gn
new file mode 100644
index 00000000..78f7b57
--- /dev/null
+++ b/www-client/chromium/files/toolchain/BUILD.gn
@@ -0,0 +1,19 @@
+import("//build/toolchain/gcc_toolchain.gni")
+
+gcc_toolchain("default") {
+  cc = getenv("CC")
+  cxx = getenv("CXX")
+  ar = getenv("AR")
+  nm = getenv("NM")
+  ld = cxx
+
+  extra_cflags = getenv("CFLAGS")
+  extra_cppflags = getenv("CPPFLAGS")
+  extra_cxxflags = getenv("CXXFLAGS")
+  extra_ldflags = getenv("LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}

Reply via email to