www-client/chromium: use custom toolchain for GN builds
authorMike Gilbert <floppym@gentoo.org>
Fri, 16 Sep 2016 03:13:40 +0000 (23:13 -0400)
committerMike Gilbert <floppym@gentoo.org>
Wed, 21 Sep 2016 02:01:24 +0000 (22:01 -0400)
Bug: https://bugs.gentoo.org/587408

www-client/chromium/chromium-55.0.2859.0.ebuild
www-client/chromium/files/toolchain/BUILD.gn [new file with mode: 0644]

index f24323421c418eaf6d9f38f7133415b9401c9321..417fe55ecc164ae087c50b58f075b3c179314a5f 100644 (file)
@@ -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 (file)
index 0000000..78f7b57
--- /dev/null
@@ -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
+  }
+}