diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-23 23:40:29 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-23 23:43:21 +0100 |
commit | 488929abc86392bed40e0f5b2a8f88ee1b398cec (patch) | |
tree | 3dd6d66e38e8d27832e53ebd26f03c222ba6ea40 /eclass/toolchain.eclass | |
parent | sys-kernel/linux-headers: bump up to 4.19 (diff) | |
download | gentoo-488929abc86392bed40e0f5b2a8f88ee1b398cec.tar.gz gentoo-488929abc86392bed40e0f5b2a8f88ee1b398cec.tar.bz2 gentoo-488929abc86392bed40e0f5b2a8f88ee1b398cec.zip |
toolchain.eclass: don't delete 'go' and 'gofmt' for cross-compilers
gcc does not build final 'go' and 'gofmt' tools when cross-compiler
is built (CHOST != CTARGET).
This change fixes gcc-stage2 building for USE=go case.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 0e44d922ebe6..47620e5ae5da 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1815,12 +1815,17 @@ toolchain_src_install() { ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER} fi done - # Rename the main go binaries as we don't want to clobber dev-lang/go - # when gcc-config runs. #567806 - if tc_version_is_at_least 5 && is_go ; then - for x in go gofmt; do - mv ${x} ${x}-${GCCMAJOR} || die - done + + # When gcc builds a crosscompiler it does not install unprefixed tools. + # When cross-building gcc does install native tools. + if ! is_crosscompile; then + # Rename the main go binaries as we don't want to clobber dev-lang/go + # when gcc-config runs. #567806 + if tc_version_is_at_least 5 && is_go ; then + for x in go gofmt; do + mv ${x} ${x}-${GCCMAJOR} || die + done + fi fi # Now do the fun stripping stuff |