diff gotools/Makefile.am @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gotools/Makefile.am	Thu Oct 25 07:37:49 2018 +0900
+++ b/gotools/Makefile.am	Thu Feb 13 11:34:05 2020 +0900
@@ -15,7 +15,7 @@
 # along with this program; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-ACLOCAL_AMFLAGS = -I ./config -I ../config
+ACLOCAL_AMFLAGS = -I ../config
 
 gcc_version := $(shell $(GCC_FOR_TARGET) -dumpversion)
 
@@ -70,31 +70,8 @@
 	$(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 \
@@ -123,8 +100,9 @@
 	*.sent
 
 mostlyclean-local:
-	-chmod -R u+w check-go-dir
-	rm -rf check-go-dir check-runtime-dir cgo-test-dir carchive-test-dir
+	if test -d check-go-dir; then chmod -R u+w check-go-dir; fi
+	rm -rf check-go-dir check-runtime-dir cgo-test-dir carchive-test-dir \
+	check-vet-dir gocache-test
 
 if NATIVE
 
@@ -138,7 +116,7 @@
 go$(EXEEXT): $(go_cmd_go_files) $(LIBGOTOOL) $(LIBGODEP)
 	$(GOLINK) $(go_cmd_go_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
 gofmt$(EXEEXT): $(go_cmd_gofmt_files) $(LIBGODEP)
-	$(GOLINK) $(go_cmd_gofmt_files) $(LIBS) $(NET_LIBS)
+	$(GOLINK) $(go_cmd_gofmt_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
 cgo$(EXEEXT): $(go_cmd_cgo_files) zdefaultcc.go $(LIBGOTOOL) $(LIBGODEP)
 	$(GOLINK) $(go_cmd_cgo_files) zdefaultcc.go $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
 vet$(EXEEXT): $(go_cmd_vet_files) $(LIBGOTOOL) $(LIBGODEP)
@@ -163,7 +141,7 @@
 GOTESTFLAGS =
 
 # Number of seconds before tests time out.
-GOTOOLS_TEST_TIMEOUT = 480
+GOTOOLS_TEST_TIMEOUT = 1200
 
 # 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:
@@ -229,7 +207,7 @@
 
 # check-go-tool runs `go test cmd/go` in our environment.
 check-go-tool: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
-	-chmod -R u+w check-go-dir
+	if test -d check-go-dir; then chmod -R u+w check-go-dir; fi
 	rm -rf check-go-dir cmd_go-testlog
 	$(MKDIR_P) check-go-dir/src/cmd/go
 	cp $(cmdsrcdir)/go/*.go check-go-dir/src/cmd/go/
@@ -237,6 +215,10 @@
 	cp $(libgodir)/zdefaultcc.go check-go-dir/src/cmd/go/internal/cfg/
 	cp -r $(cmdsrcdir)/go/testdata check-go-dir/src/cmd/go/
 	cp -r $(cmdsrcdir)/internal check-go-dir/src/cmd/
+	$(MKDIR_P) check-go-dir/src/cmd/vendor/golang.org/x
+	cp -r $(libgosrcdir)/golang.org/x/mod check-go-dir/src/cmd/vendor/golang.org/x/
+	cp -r $(libgosrcdir)/golang.org/x/crypto check-go-dir/src/cmd/vendor/golang.org/x/
+	cp -r $(libgosrcdir)/golang.org/x/xerrors check-go-dir/src/cmd/vendor/golang.org/x/
 	cp $(libgodir)/objabi.go check-go-dir/src/cmd/internal/objabi/
 	@abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
 	abs_checkdir=`cd check-go-dir && $(PWD_COMMAND)`; \
@@ -256,6 +238,7 @@
 	$(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`; \
@@ -269,7 +252,7 @@
 	$(SHELL) $(libgosrcdir)/../testsuite/gotest --goarch=$${GOARCH} --goos=$${GOOS} --basedir=$(libgosrcdir)/.. --srcdir=$(libgosrcdir)/runtime --pkgpath=runtime --pkgfiles="$${files}" $(GOTESTFLAGS) -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v >> runtime-testlog 2>&1 || echo "--- $${fl}: go test runtime (0.00s)" >> runtime-testlog
 	grep '^--- ' runtime-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
 
-# check-cgo-test runs `go test misc/cgo/test` in our environment.
+# check-cgo-test runs `go test` in misc/cgo/test.
 check-cgo-test: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
 	rm -rf cgo-test-dir cgo-testlog
 	$(MKDIR_P) cgo-test-dir/misc/cgo
@@ -282,27 +265,28 @@
 	(cd cgo-test-dir/misc/cgo/test && $(abs_builddir)/go$(EXEEXT) test -test.short -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v) >> cgo-testlog 2>&1 || echo "--- $${fl}: go test misc/cgo/test (0.00s)" >> cgo-testlog
 	grep '^--- ' cgo-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
 
-# check-carchive-test runs `go test misc/cgo/testcarchive/carchive_test.go`
+# check-carchive-test runs `go test` in misc/cgo/testcarchive.
 # in our environment.
 check-carchive-test: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
 	rm -rf carchive-test-dir carchive-testlog
 	$(MKDIR_P) carchive-test-dir/misc/cgo
 	cp -r $(libgomiscdir)/cgo/testcarchive carchive-test-dir/misc/cgo/
 	@abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
-	echo "cd carchive-test-dir/misc/cgo/testcarchive && $(ECHO_ENV) LIBRARY_PATH=`echo $${abs_libgodir}/.libs` $(abs_builddir)/go$(EXEEXT) test -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v carchive_test.go" > carchive-testlog
+	echo "cd carchive-test-dir/misc/cgo/testcarchive && $(ECHO_ENV) LIBRARY_PATH=`echo $${abs_libgodir}/.libs` $(abs_builddir)/go$(EXEEXT) test -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v" > carchive-testlog
 	$(CHECK_ENV) \
 	LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
 	export LIBRARY_PATH; \
-	(cd carchive-test-dir/misc/cgo/testcarchive && $(abs_builddir)/go$(EXEEXT) test -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v carchive_test.go) >> carchive-testlog 2>&1 || echo "--- $${fl}: go test misc/cgo/testcarchive (0.00s)" >> carchive-testlog
+	(cd carchive-test-dir/misc/cgo/testcarchive && $(abs_builddir)/go$(EXEEXT) test -test.timeout=$(GOTOOLS_TEST_TIMEOUT)s -test.v) >> carchive-testlog 2>&1 || echo "--- $${fl}: go test misc/cgo/testcarchive (0.00s)" >> carchive-testlog
 	grep '^--- ' carchive-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
 
 # 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