Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 23 Oct 2018 22:43:53
Message-Id: 1540334601.488929abc86392bed40e0f5b2a8f88ee1b398cec.slyfox@gentoo
1 commit: 488929abc86392bed40e0f5b2a8f88ee1b398cec
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 23 22:40:29 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 23 22:43:21 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=488929ab
7
8 toolchain.eclass: don't delete 'go' and 'gofmt' for cross-compilers
9
10 gcc does not build final 'go' and 'gofmt' tools when cross-compiler
11 is built (CHOST != CTARGET).
12
13 This change fixes gcc-stage2 building for USE=go case.
14
15 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
16
17 eclass/toolchain.eclass | 17 +++++++++++------
18 1 file changed, 11 insertions(+), 6 deletions(-)
19
20 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
21 index 0e44d922ebe..47620e5ae5d 100644
22 --- a/eclass/toolchain.eclass
23 +++ b/eclass/toolchain.eclass
24 @@ -1815,12 +1815,17 @@ toolchain_src_install() {
25 ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER}
26 fi
27 done
28 - # Rename the main go binaries as we don't want to clobber dev-lang/go
29 - # when gcc-config runs. #567806
30 - if tc_version_is_at_least 5 && is_go ; then
31 - for x in go gofmt; do
32 - mv ${x} ${x}-${GCCMAJOR} || die
33 - done
34 +
35 + # When gcc builds a crosscompiler it does not install unprefixed tools.
36 + # When cross-building gcc does install native tools.
37 + if ! is_crosscompile; then
38 + # Rename the main go binaries as we don't want to clobber dev-lang/go
39 + # when gcc-config runs. #567806
40 + if tc_version_is_at_least 5 && is_go ; then
41 + for x in go gofmt; do
42 + mv ${x} ${x}-${GCCMAJOR} || die
43 + done
44 + fi
45 fi
46
47 # Now do the fun stripping stuff