Re: [gofrontend-dev] Re: libgo patch committed: Update to Go1.12beta2
On Tue, Jan 22, 2019 at 12:46 AM Uros Bizjak wrote: > > > I have committed a patch to update libgo to the Go 1.12beta2 release. > > > > As usual this sort of update is too large to include all changes in > > this e-mail. I've included changes to gccgo-specific files below. > > > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > > to mainline. > > Attached patch is needed to prevent panic on alphaec68-linux-gnu when > building test harness in gotools directory. It substitutes one > instance of hardcoded "gc" with build.Default.Compiler in place where > archSizes are determined. Please note that there are other similar > cases, which don't trigger panics for me, but are suspicious, too: > > [uros@localhost golang.org]$ grep -R "\"gc\"" * > x/tools/go/analysis/unitchecker/unitchecker.go: Sizes: > types.SizesFor("gc", build.Default.GOARCH), // assume gccgo ≡ gc? > x/tools/go/analysis/passes/asmdecl/asmdecl.go: arch.sizes = > types.SizesFor("gc", arch.name) > x/tools/go/analysis/passes/asmdecl/asmdecl.go: > arch.sizes = types.SizesFor("gc", "amd64") > x/tools/go/analysis/passes/printf/types.go:var archSizes = > types.SizesFor("gc", build.Default.GOARCH) > x/tools/go/analysis/passes/cgocall/cgocall.go: Sizes: > types.SizesFor("gc", build.Default.GOARCH), > > Patch was regression tested on alphaev68-linux-gnu, and fixes a bunch > of panics in gotools directory. Thanks. I committed the larger change to mainline, as follows. This updates all the calls, except for the one in the asmdecl pass, which is not applicable to gccgo anyhow. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 268131) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -fb44f62e7c01ebc987dad78875f593da1817 +e3271f3e09337b951822ba5c596d8cfe3b94508e The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go === --- libgo/go/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go (revision 268084) +++ libgo/go/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go (working copy) @@ -271,7 +271,7 @@ func typeCheckCgoSourceFiles(fset *token return importMap[path], nil }), // TODO(adonovan): Sizes should probably be provided by analysis.Pass. - Sizes: types.SizesFor("gc", build.Default.GOARCH), + Sizes: types.SizesFor("gccgo", build.Default.GOARCH), Error: func(error) {}, // ignore errors (e.g. unused import) } Index: libgo/go/golang.org/x/tools/go/analysis/passes/printf/types.go === --- libgo/go/golang.org/x/tools/go/analysis/passes/printf/types.go (revision 268084) +++ libgo/go/golang.org/x/tools/go/analysis/passes/printf/types.go (working copy) @@ -236,4 +236,4 @@ func matchStructArgType(pass *analysis.P return true } -var archSizes = types.SizesFor("gc", build.Default.GOARCH) +var archSizes = types.SizesFor("gccgo", build.Default.GOARCH) Index: libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go === --- libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go (revision 268084) +++ libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go (working copy) @@ -125,4 +125,4 @@ var ( uintptrBitSize = 8 * archSizes.Sizeof(types.Typ[types.Uintptr]) ) -var archSizes = types.SizesFor("gc", build.Default.GOARCH) +var archSizes = types.SizesFor("gccgo", build.Default.GOARCH) Index: libgo/go/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go === --- libgo/go/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go (revision 268084) +++ libgo/go/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go (working copy) @@ -221,7 +221,7 @@ func run(fset *token.FileSet, cfg *Confi }) tc := { Importer: importer, - Sizes:types.SizesFor("gc", build.Default.GOARCH), // assume gccgo ≡ gc? + Sizes:types.SizesFor("gccgo", build.Default.GOARCH), // assume gccgo ≡ gc? } info := { Types: make(map[ast.Expr]types.TypeAndValue),
Re: libgo patch committed: Update to Go1.12beta2
Hello! > I have committed a patch to update libgo to the Go 1.12beta2 release. > > As usual this sort of update is too large to include all changes in > this e-mail. I've included changes to gccgo-specific files below. > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > to mainline. Attached patch is needed to prevent panic on alphaec68-linux-gnu when building test harness in gotools directory. It substitutes one instance of hardcoded "gc" with build.Default.Compiler in place where archSizes are determined. Please note that there are other similar cases, which don't trigger panics for me, but are suspicious, too: [uros@localhost golang.org]$ grep -R "\"gc\"" * x/tools/go/analysis/unitchecker/unitchecker.go: Sizes: types.SizesFor("gc", build.Default.GOARCH), // assume gccgo ≡ gc? x/tools/go/analysis/passes/asmdecl/asmdecl.go: arch.sizes = types.SizesFor("gc", arch.name) x/tools/go/analysis/passes/asmdecl/asmdecl.go: arch.sizes = types.SizesFor("gc", "amd64") x/tools/go/analysis/passes/printf/types.go:var archSizes = types.SizesFor("gc", build.Default.GOARCH) x/tools/go/analysis/passes/cgocall/cgocall.go: Sizes: types.SizesFor("gc", build.Default.GOARCH), Patch was regression tested on alphaev68-linux-gnu, and fixes a bunch of panics in gotools directory. Uros. diff --git a/libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go b/libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go index 56b150b2b132..beb0b124b0e5 100644 --- a/libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go +++ b/libgo/go/golang.org/x/tools/go/analysis/passes/shift/shift.go @@ -125,4 +125,4 @@ var ( uintptrBitSize = 8 * archSizes.Sizeof(types.Typ[types.Uintptr]) ) -var archSizes = types.SizesFor("gc", build.Default.GOARCH) +var archSizes = types.SizesFor(build.Default.Compiler, build.Default.GOARCH)
Re: libgo patch committed: Update to Go1.12beta2
On Mon, Jan 21, 2019 at 4:22 AM Matthias Klose wrote: > > On 18.01.19 20:04, Ian Lance Taylor wrote: > > I have committed a patch to update libgo to the Go 1.12beta2 release. > > > > As usual this sort of update is too large to include all changes in > > this e-mail. I've included changes to gccgo-specific files below. > > > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > > to mainline. > > this broke the ARM32 builds: > > libtool: compile: /<>/build/./gcc/gccgo > -B/<>/build/./gcc/ -B/usr/arm-linux-gnueabihf/bin/ > -B/usr/arm-linux-gnueabihf/lib/ -isystem /usr > /arm-linux-gnueabihf/include -isystem /usr/arm-linux-gnueabihf/sys-include > -isystem /<>/build/sys-include -fchecking=1 -O2 -g -I . -c > -fgo-pkgpath=int > ernal/cpu ../../../src/libgo/go/internal/cpu/cpu.go cpugen.go -fPIC -o > internal/.libs/cpu.o > ../../../src/libgo/go/internal/cpu/cpu.go:138:2: error: reference to undefined > name 'doinit' > 138 | doinit() > | ^ > make[6]: *** [Makefile:2843: internal/cpu.lo] Error 1 > make[6]: Leaving directory '/<>/build/arm-linux-gnueabihf/libgo' > make[5]: *** [Makefile:2241: all-recursive] Error 1 This is PR 88927. There is a patch out for review. > on the HURD (without any local patches): > > gccgo: fatal error: no input files > compilation terminated. > Makefile:2843: recipe for target 'runtime.lo' failed > make[6]: *** [runtime.lo] Error 1 > make[6]: Leaving directory '/<>/build/i686-gnu/libgo' > Makefile:2241: recipe for target 'all-recursive' failed > make[5]: *** [all-recursive] Error 1 Last I heard Svante was going to send another set of Hurd patches. Ian
Re: libgo patch committed: Update to Go1.12beta2
On 18.01.19 20:04, Ian Lance Taylor wrote: > I have committed a patch to update libgo to the Go 1.12beta2 release. > > As usual this sort of update is too large to include all changes in > this e-mail. I've included changes to gccgo-specific files below. > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > to mainline. this broke the ARM32 builds: libtool: compile: /<>/build/./gcc/gccgo -B/<>/build/./gcc/ -B/usr/arm-linux-gnueabihf/bin/ -B/usr/arm-linux-gnueabihf/lib/ -isystem /usr /arm-linux-gnueabihf/include -isystem /usr/arm-linux-gnueabihf/sys-include -isystem /<>/build/sys-include -fchecking=1 -O2 -g -I . -c -fgo-pkgpath=int ernal/cpu ../../../src/libgo/go/internal/cpu/cpu.go cpugen.go -fPIC -o internal/.libs/cpu.o ../../../src/libgo/go/internal/cpu/cpu.go:138:2: error: reference to undefined name 'doinit' 138 | doinit() | ^ make[6]: *** [Makefile:2843: internal/cpu.lo] Error 1 make[6]: Leaving directory '/<>/build/arm-linux-gnueabihf/libgo' make[5]: *** [Makefile:2241: all-recursive] Error 1 on the HURD (without any local patches): gccgo: fatal error: no input files compilation terminated. Makefile:2843: recipe for target 'runtime.lo' failed make[6]: *** [runtime.lo] Error 1 make[6]: Leaving directory '/<>/build/i686-gnu/libgo' Makefile:2241: recipe for target 'all-recursive' failed make[5]: *** [all-recursive] Error 1
libgo patch committed: Update to Go1.12beta2
I have committed a patch to update libgo to the Go 1.12beta2 release. As usual this sort of update is too large to include all changes in this e-mail. I've included changes to gccgo-specific files below. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian gotools/ 2019-01-18 Ian Lance Taylor * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/ 2019-01-18 Ian Lance Taylor * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 268078) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -d16e9181a760796802c067730bb030b92b63fb2c +c76ba3014e42cc6adc3d43709bba28c5ad7a6ba2 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gotools/Makefile.am === --- gotools/Makefile.am (revision 268078) +++ gotools/Makefile.am (working copy) @@ -70,31 +70,8 @@ go_cmd_cgo_files = \ $(cmdsrcdir)/cgo/util.go go_cmd_vet_files = \ - $(cmdsrcdir)/vet/asmdecl.go \ - $(cmdsrcdir)/vet/assign.go \ - $(cmdsrcdir)/vet/atomic.go \ - $(cmdsrcdir)/vet/bool.go \ - $(cmdsrcdir)/vet/buildtag.go \ - $(cmdsrcdir)/vet/cgo.go \ - $(cmdsrcdir)/vet/composite.go \ - $(cmdsrcdir)/vet/copylock.go \ - $(cmdsrcdir)/vet/deadcode.go \ - $(cmdsrcdir)/vet/dead.go \ $(cmdsrcdir)/vet/doc.go \ - $(cmdsrcdir)/vet/httpresponse.go \ - $(cmdsrcdir)/vet/lostcancel.go \ - $(cmdsrcdir)/vet/main.go \ - $(cmdsrcdir)/vet/method.go \ - $(cmdsrcdir)/vet/nilfunc.go \ - $(cmdsrcdir)/vet/print.go \ - $(cmdsrcdir)/vet/rangeloop.go \ - $(cmdsrcdir)/vet/shadow.go \ - $(cmdsrcdir)/vet/shift.go \ - $(cmdsrcdir)/vet/structtag.go \ - $(cmdsrcdir)/vet/tests.go \ - $(cmdsrcdir)/vet/types.go \ - $(cmdsrcdir)/vet/unsafeptr.go \ - $(cmdsrcdir)/vet/unused.go + $(cmdsrcdir)/vet/main.go go_cmd_buildid_files = \ $(cmdsrcdir)/buildid/buildid.go \ @@ -163,7 +140,7 @@ uninstall-local: GOTESTFLAGS = # Number of seconds before tests time out. -GOTOOLS_TEST_TIMEOUT = 480 +GOTOOLS_TEST_TIMEOUT = 600 # Run tests using the go tool, and frob the output to look like that # generated by DejaGNU. The main output of this is two files: @@ -256,6 +233,7 @@ check-runtime: go$(EXEEXT) $(noinst_PROG $(MKDIR_P) check-runtime-dir @abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \ LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \ + export LD_LIBRARY_PATH; \ GOARCH=`$(abs_builddir)/go$(EXEEXT) env GOARCH`; \ GOOS=`$(abs_builddir)/go$(EXEEXT) env GOOS`; \ files=`$(SHELL) $(libgosrcdir)/../match.sh --goarch=$${GOARCH} --goos=$${GOOS} --srcdir=$(libgosrcdir)/runtime --extrafiles="$(libgodir)/runtime_sysinfo.go $(libgodir)/sigtab.go" --tag=libffi`; \ @@ -299,10 +277,11 @@ check-carchive-test: go$(EXEEXT) $(noins # check-vet runs `go test cmd/vet` in our environment. check-vet: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc rm -rf check-vet-dir cmd_vet-testlog - $(MKDIR_P) check-vet-dir/src/cmd/internal + $(MKDIR_P) check-vet-dir/src/cmd/internal check-vet-dir/src/cmd/vendor/golang.org/x cp -r $(cmdsrcdir)/vet check-vet-dir/src/cmd/ cp -r $(cmdsrcdir)/internal/objabi check-vet-dir/src/cmd/internal cp $(libgodir)/objabi.go check-vet-dir/src/cmd/internal/objabi/ + cp -r $(libgosrcdir)/golang.org/x/tools check-vet-dir/src/cmd/vendor/golang.org/x/ @abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \ abs_checkdir=`cd check-vet-dir && $(PWD_COMMAND)`; \ echo "cd check-vet-dir/src/cmd/vet && $(ECHO_ENV) GOPATH=$${abs_checkdir} $(abs_builddir)/go$(EXEEXT) test -test.short -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v" > cmd_vet-testlog Index: gcc/testsuite/go.go-torture/execute/names-1.go === --- gcc/testsuite/go.go-torture/execute/names-1.go (revision 268078) +++ gcc/testsuite/go.go-torture/execute/names-1.go (working copy) @@ -7,9 +7,9 @@ import ( "debug/elf" "debug/macho" "debug/pe" - "debug/xcoff" "fmt" "os" + "runtime" "strings" ) @@ -61,6 +61,12 @@ func Function3(out *bytes.Buffer) { } func main() { + if runtime.GOOS == "aix" { + // Not supported on AIX until there is an