From d6ba7bef53246b8132d81b5ef0620e32b9fbcb89 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 15 Sep 2016 23:13:40 -0400 Subject: 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(+) create mode 100644 www-client/chromium/files/toolchain/BUILD.gn (limited to 'www-client/chromium') diff --git a/www-client/chromium/chromium-55.0.2859.0.ebuild b/www-client/chromium/chromium-55.0.2859.0.ebuild index f24323421c41..417fe55ecc16 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 000000000000..78f7b57e3be5 --- /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 + } +} -- cgit v1.2.3-65-gdbad