PR 65570 points out that the recent patch to the go tool breaks the use of cgo (and obviously also points out that we need better testing for go and cgo). The problem is that the go tool treats the runtime/cgo package specially. Although gccgo doesn't use that package, the go tool needs to know that it has no source code. This patch fixes it. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
diff -r 2048f406394a libgo/Makefile.am --- a/libgo/Makefile.am Tue Mar 24 13:54:30 2015 -0700 +++ b/libgo/Makefile.am Wed Mar 25 14:14:41 2015 -0700 @@ -987,7 +987,7 @@ echo 'package main' > zstdpkglist.go.tmp echo "" >> zstdpkglist.go.tmp echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp - echo $(libgo_go_objs) 'unsafe.lo' | sed 's/\.lo /\": true,\n/g' | sed 's/\.lo/\": true,/' | sed 's/-go//' | grep -v _c | sed 's/^/\t\"/' | sort | uniq >> zstdpkglist.go.tmp + echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's/\.lo /\": true,\n/g' | sed 's/\.lo/\": true,/' | sed 's/-go//' | grep -v _c | sed 's/^/\t\"/' | sort | uniq >> zstdpkglist.go.tmp echo '}' >> zstdpkglist.go.tmp $(SHELL) $(srcdir)/mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go $(STAMP) $@