toolchain.eclass: delete `go` and `gofmt` for now #567806
authorMike Frysinger <vapier@gentoo.org>
Sun, 13 Dec 2015 04:44:39 +0000 (23:44 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 13 Dec 2015 04:45:46 +0000 (23:45 -0500)
We have dev-lang/go provide `go` and `gofmt`, and having gcc include
these in its BINPATH causes gcc-config to clobber the go package with
symlinks.  Drop the gcc versions for now (they're copies from the go
package anyways) until we have a better solution.

eclass/toolchain.eclass

index eb6c4a19fe1a40e2683f0cc8e23b8f539d64907a..43fa8bffc970cf2d8b3ae4d4a8392fcb1892b3fb 100644 (file)
@@ -1686,6 +1686,11 @@ toolchain_src_install() {
                        ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER}
                fi
        done
+       # Clear out 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
+               rm -f go gofmt
+       fi
 
        # Now do the fun stripping stuff
        env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"