aboutsummaryrefslogtreecommitdiff
path: root/gotools
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-01-09 01:23:08 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-01-09 01:23:08 +0000
commit1a2f01efa63036a5104f203a4789e682c0e0915d (patch)
tree373e15778dc8295354584e1f86915ae493b604ff /gotools
parent8799df67f2dab88f9fda11739c501780a85575e2 (diff)
downloadgcc-1a2f01efa63036a5104f203a4789e682c0e0915d.zip
gcc-1a2f01efa63036a5104f203a4789e682c0e0915d.tar.gz
gcc-1a2f01efa63036a5104f203a4789e682c0e0915d.tar.bz2
libgo: update to Go1.10beta1
Update the Go library to the 1.10beta1 release. Requires a few changes to the compiler for modifications to the map runtime code, and to handle some nowritebarrier cases in the runtime. Reviewed-on: https://go-review.googlesource.com/86455 gotools/: * Makefile.am (go_cmd_vet_files): New variable. (go_cmd_buildid_files, go_cmd_test2json_files): New variables. (s-zdefaultcc): Change from constants to functions. (noinst_PROGRAMS): Add vet, buildid, and test2json. (cgo$(EXEEXT)): Link against $(LIBGOTOOL). (vet$(EXEEXT)): New target. (buildid$(EXEEXT)): New target. (test2json$(EXEEXT)): New target. (install-exec-local): Install all $(noinst_PROGRAMS). (uninstall-local): Uninstasll all $(noinst_PROGRAMS). (check-go-tool): Depend on $(noinst_PROGRAMS). Copy down objabi.go. (check-runtime): Depend on $(noinst_PROGRAMS). (check-cgo-test, check-carchive-test): Likewise. (check-vet): New target. (check): Depend on check-vet. Look at cmd_vet-testlog. (.PHONY): Add check-vet. * Makefile.in: Rebuild. From-SVN: r256365
Diffstat (limited to 'gotools')
-rw-r--r--gotools/ChangeLog21
-rw-r--r--gotools/Makefile.am97
-rw-r--r--gotools/Makefile.in120
3 files changed, 199 insertions, 39 deletions
diff --git a/gotools/ChangeLog b/gotools/ChangeLog
index bd6e13f..70c6116 100644
--- a/gotools/ChangeLog
+++ b/gotools/ChangeLog
@@ -1,3 +1,24 @@
+2018-01-08 Ian Lance Taylor <iant@golang.org>
+
+ * Makefile.am (go_cmd_vet_files): New variable.
+ (go_cmd_buildid_files, go_cmd_test2json_files): New variables.
+ (s-zdefaultcc): Change from constants to functions.
+ (noinst_PROGRAMS): Add vet, buildid, and test2json.
+ (cgo$(EXEEXT)): Link against $(LIBGOTOOL).
+ (vet$(EXEEXT)): New target.
+ (buildid$(EXEEXT)): New target.
+ (test2json$(EXEEXT)): New target.
+ (install-exec-local): Install all $(noinst_PROGRAMS).
+ (uninstall-local): Uninstasll all $(noinst_PROGRAMS).
+ (check-go-tool): Depend on $(noinst_PROGRAMS). Copy down
+ objabi.go.
+ (check-runtime): Depend on $(noinst_PROGRAMS).
+ (check-cgo-test, check-carchive-test): Likewise.
+ (check-vet): New target.
+ (check): Depend on check-vet. Look at cmd_vet-testlog.
+ (.PHONY): Add check-vet.
+ * Makefile.in: Rebuild.
+
2017-10-25 Ian Lance Taylor <iant@golang.org>
* Makefile.am (check-go-tool): Output colon after ${fl}.
diff --git a/gotools/Makefile.am b/gotools/Makefile.am
index cbb64ae..3cecee6 100644
--- a/gotools/Makefile.am
+++ b/gotools/Makefile.am
@@ -69,6 +69,40 @@ go_cmd_cgo_files = \
$(cmdsrcdir)/cgo/out.go \
$(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
+
+go_cmd_buildid_files = \
+ $(cmdsrcdir)/buildid/buildid.go \
+ $(cmdsrcdir)/buildid/doc.go
+
+go_cmd_test2json_files = \
+ $(cmdsrcdir)/test2json/main.go
+
GCCGO_INSTALL_NAME := $(shell echo gccgo|sed '$(program_transform_name)')
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
@@ -76,9 +110,9 @@ GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
zdefaultcc.go: s-zdefaultcc; @true
s-zdefaultcc: Makefile
echo 'package main' > zdefaultcc.go.tmp
- echo 'const defaultGCCGO = "$(bindir)/$(GCCGO_INSTALL_NAME)"' >> zdefaultcc.go.tmp
- echo 'const defaultCC = "$(GCC_INSTALL_NAME)"' >> zdefaultcc.go.tmp
- echo 'const defaultCXX = "$(GXX_INSTALL_NAME)"' >> zdefaultcc.go.tmp
+ echo 'func defaultGCCGO(goos, goarch string) string { return "$(bindir)/$(GCCGO_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
+ echo 'func defaultCC(goos, goarch string) string { return "$(GCC_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
+ echo 'func defaultCXX(goos, goarch string) string { return "$(GXX_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
echo 'const defaultPkgConfig = "pkg-config"' >> zdefaultcc.go.tmp
$(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go
$(STAMP) $@
@@ -97,23 +131,33 @@ if NATIVE
# and install them as regular programs.
bin_PROGRAMS = go$(EXEEXT) gofmt$(EXEEXT)
-noinst_PROGRAMS = cgo$(EXEEXT)
+noinst_PROGRAMS = cgo$(EXEEXT) vet$(EXEEXT) buildid$(EXEEXT) test2json$(EXEEXT)
man_MANS = go.1 gofmt.1
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)
-cgo$(EXEEXT): $(go_cmd_cgo_files) zdefaultcc.go $(LIBGODEP)
- $(GOLINK) $(go_cmd_cgo_files) zdefaultcc.go $(LIBS) $(NET_LIBS)
-
-install-exec-local: cgo$(EXEEXT)
+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)
+ $(GOLINK) $(go_cmd_vet_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+buildid$(EXEEXT): $(go_cmd_buildid_files) $(LIBGOTOOL) $(LIBGODEP)
+ $(GOLINK) $(go_cmd_buildid_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+test2json$(EXEEXT): $(go_cmd_test2json_files) $(LIBGOTOOL) $(LIBGODEP)
+ $(GOLINK) $(go_cmd_test2json_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+
+install-exec-local: $(noinst_PROGRAMS)
$(MKDIR_P) $(DESTDIR)$(libexecsubdir)
- rm -f $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
- $(INSTALL_PROGRAM) cgo$(exeext) $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
+ for f in $(noinst_PROGRAMS); do \
+ rm -f $(DESTDIR)$(libexecsubdir)/$$f; \
+ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(libexecsubdir)/$$f; \
+ done
uninstall-local:
- rm -f $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
+ for f in $(noinst_PROGRAMS); do \
+ rm -f $(DESTDIR)$(libexecsubdir)/$$f; \
+ done
GOTESTFLAGS =
@@ -177,8 +221,8 @@ CHECK_ENV = \
# It assumes that abs_libgodir is set.
ECHO_ENV = PATH=`echo $(abs_builddir):$${PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GCCGO='$(abs_builddir)/check-gccgo' CC='$(abs_builddir)/check-gcc' GCCGOTOOLDIR='$(abs_builddir)' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GOROOT=`echo $${abs_libgodir}`
-# check-go-tools runs `go test cmd/go` in our environment.
-check-go-tool: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+# check-go-tool runs `go test cmd/go` in our environment.
+check-go-tool: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
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/
@@ -187,6 +231,7 @@ check-go-tool: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
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/
+ 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)`; \
echo "cd check-go-dir/src/cmd/go && $(ECHO_ENV) GOPATH=$${abs_checkdir} $(abs_builddir)/go$(EXEEXT) test -test.short -test.v" > cmd_go-testlog
@@ -200,7 +245,7 @@ check-go-tool: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
# The runtime package is also tested as part of libgo,
# but the runtime tests use the go tool heavily, so testing
# here too will catch more problems.
-check-runtime: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+check-runtime: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
rm -rf check-runtime-dir runtime-testlog
$(MKDIR_P) check-runtime-dir
@abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
@@ -219,7 +264,7 @@ check-runtime: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
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: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+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
cp -r $(libgomiscdir)/cgo/test cgo-test-dir/misc/cgo/
@@ -233,7 +278,7 @@ check-cgo-test: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
# check-carchive-test runs `go test misc/cgo/testcarchive/carchive_test.go`
# in our environment.
-check-carchive-test: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+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/
@@ -245,11 +290,25 @@ check-carchive-test: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
(cd carchive-test-dir/misc/cgo/testcarchive && $(abs_builddir)/go$(EXEEXT) test -test.v carchive_test.go) >> 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
+ cp -r $(cmdsrcdir)/vet check-vet-dir/src/cmd/
+ @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.v" > cmd_vet-testlog
+ $(CHECK_ENV) \
+ GOPATH=`cd check-vet-dir && $(PWD_COMMAND)`; \
+ export GOPATH; \
+ (cd check-vet-dir/src/cmd/vet && $(abs_builddir)/go$(EXEEXT) test -test.short -test.v) >> cmd_vet-testlog 2>&1 || echo "--- $${fl}: go test cmd/vet (0.00s)" >> cmd_vet-testlog
+ grep '^--- ' cmd_vet-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
+
# The check targets runs the tests and assembles the output files.
-check: check-head check-go-tool check-runtime check-cgo-test check-carchive-test
+check: check-head check-go-tool check-runtime check-cgo-test check-carchive-test check-vet
@mv gotools.head gotools.sum
@cp gotools.sum gotools.log
- @for file in cmd_go-testlog runtime-testlog cgo-testlog carchive-testlog; do \
+ @for file in cmd_go-testlog runtime-testlog cgo-testlog carchive-testlog cmd_vet-testlog; do \
testname=`echo $${file} | sed -e 's/-testlog//' -e 's|_|/|'`; \
echo "Running $${testname}" >> gotools.sum; \
echo "Running $${testname}" >> gotools.log; \
@@ -275,7 +334,7 @@ check: check-head check-go-tool check-runtime check-cgo-test check-carchive-test
@echo "runtest completed at `date`" >> gotools.log
@if grep '^FAIL' gotools.sum >/dev/null 2>&1; then exit 1; fi
-.PHONY: check check-head check-go-tool check-runtime check-cgo-test check-carchive-test
+.PHONY: check check-head check-go-tool check-runtime check-cgo-test check-carchive-test check-vet
else
diff --git a/gotools/Makefile.in b/gotools/Makefile.in
index 4f2b107..77ebd15 100644
--- a/gotools/Makefile.in
+++ b/gotools/Makefile.in
@@ -88,6 +88,9 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+buildid_SOURCES = buildid.c
+buildid_OBJECTS = buildid.$(OBJEXT)
+buildid_LDADD = $(LDADD)
cgo_SOURCES = cgo.c
cgo_OBJECTS = cgo.$(OBJEXT)
cgo_LDADD = $(LDADD)
@@ -97,6 +100,12 @@ go_LDADD = $(LDADD)
gofmt_SOURCES = gofmt.c
gofmt_OBJECTS = gofmt.$(OBJEXT)
gofmt_LDADD = $(LDADD)
+test2json_SOURCES = test2json.c
+test2json_OBJECTS = test2json.$(OBJEXT)
+test2json_LDADD = $(LDADD)
+vet_SOURCES = vet.c
+vet_OBJECTS = vet.$(OBJEXT)
+vet_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
@@ -105,7 +114,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = cgo.c go.c gofmt.c
+SOURCES = buildid.c cgo.c go.c gofmt.c test2json.c vet.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -288,6 +297,40 @@ go_cmd_cgo_files = \
$(cmdsrcdir)/cgo/out.go \
$(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
+
+go_cmd_buildid_files = \
+ $(cmdsrcdir)/buildid/buildid.go \
+ $(cmdsrcdir)/buildid/doc.go
+
+go_cmd_test2json_files = \
+ $(cmdsrcdir)/test2json/main.go
+
GCCGO_INSTALL_NAME := $(shell echo gccgo|sed '$(program_transform_name)')
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
@@ -300,7 +343,7 @@ MOSTLYCLEANFILES = \
# For a native build we build the programs using the newly built libgo
# and install them as regular programs.
@NATIVE_TRUE@bin_PROGRAMS = go$(EXEEXT) gofmt$(EXEEXT)
-@NATIVE_TRUE@noinst_PROGRAMS = cgo$(EXEEXT)
+@NATIVE_TRUE@noinst_PROGRAMS = cgo$(EXEEXT) vet$(EXEEXT) buildid$(EXEEXT) test2json$(EXEEXT)
@NATIVE_TRUE@man_MANS = go.1 gofmt.1
@NATIVE_TRUE@GOTESTFLAGS =
@@ -411,6 +454,9 @@ clean-binPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+@NATIVE_FALSE@buildid$(EXEEXT): $(buildid_OBJECTS) $(buildid_DEPENDENCIES) $(EXTRA_buildid_DEPENDENCIES)
+@NATIVE_FALSE@ @rm -f buildid$(EXEEXT)
+@NATIVE_FALSE@ $(LINK) $(buildid_OBJECTS) $(buildid_LDADD) $(LIBS)
@NATIVE_FALSE@cgo$(EXEEXT): $(cgo_OBJECTS) $(cgo_DEPENDENCIES) $(EXTRA_cgo_DEPENDENCIES)
@NATIVE_FALSE@ @rm -f cgo$(EXEEXT)
@NATIVE_FALSE@ $(LINK) $(cgo_OBJECTS) $(cgo_LDADD) $(LIBS)
@@ -420,6 +466,12 @@ clean-noinstPROGRAMS:
@NATIVE_FALSE@gofmt$(EXEEXT): $(gofmt_OBJECTS) $(gofmt_DEPENDENCIES) $(EXTRA_gofmt_DEPENDENCIES)
@NATIVE_FALSE@ @rm -f gofmt$(EXEEXT)
@NATIVE_FALSE@ $(LINK) $(gofmt_OBJECTS) $(gofmt_LDADD) $(LIBS)
+@NATIVE_FALSE@test2json$(EXEEXT): $(test2json_OBJECTS) $(test2json_DEPENDENCIES) $(EXTRA_test2json_DEPENDENCIES)
+@NATIVE_FALSE@ @rm -f test2json$(EXEEXT)
+@NATIVE_FALSE@ $(LINK) $(test2json_OBJECTS) $(test2json_LDADD) $(LIBS)
+@NATIVE_FALSE@vet$(EXEEXT): $(vet_OBJECTS) $(vet_DEPENDENCIES) $(EXTRA_vet_DEPENDENCIES)
+@NATIVE_FALSE@ @rm -f vet$(EXEEXT)
+@NATIVE_FALSE@ $(LINK) $(vet_OBJECTS) $(vet_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -427,9 +479,12 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gofmt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2json.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vet.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -676,9 +731,9 @@ uninstall-man: uninstall-man1
zdefaultcc.go: s-zdefaultcc; @true
s-zdefaultcc: Makefile
echo 'package main' > zdefaultcc.go.tmp
- echo 'const defaultGCCGO = "$(bindir)/$(GCCGO_INSTALL_NAME)"' >> zdefaultcc.go.tmp
- echo 'const defaultCC = "$(GCC_INSTALL_NAME)"' >> zdefaultcc.go.tmp
- echo 'const defaultCXX = "$(GXX_INSTALL_NAME)"' >> zdefaultcc.go.tmp
+ echo 'func defaultGCCGO(goos, goarch string) string { return "$(bindir)/$(GCCGO_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
+ echo 'func defaultCC(goos, goarch string) string { return "$(GCC_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
+ echo 'func defaultCXX(goos, goarch string) string { return "$(GXX_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
echo 'const defaultPkgConfig = "pkg-config"' >> zdefaultcc.go.tmp
$(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go
$(STAMP) $@
@@ -690,16 +745,26 @@ mostlyclean-local:
@NATIVE_TRUE@ $(GOLINK) $(go_cmd_go_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
@NATIVE_TRUE@gofmt$(EXEEXT): $(go_cmd_gofmt_files) $(LIBGODEP)
@NATIVE_TRUE@ $(GOLINK) $(go_cmd_gofmt_files) $(LIBS) $(NET_LIBS)
-@NATIVE_TRUE@cgo$(EXEEXT): $(go_cmd_cgo_files) zdefaultcc.go $(LIBGODEP)
-@NATIVE_TRUE@ $(GOLINK) $(go_cmd_cgo_files) zdefaultcc.go $(LIBS) $(NET_LIBS)
-
-@NATIVE_TRUE@install-exec-local: cgo$(EXEEXT)
+@NATIVE_TRUE@cgo$(EXEEXT): $(go_cmd_cgo_files) zdefaultcc.go $(LIBGOTOOL) $(LIBGODEP)
+@NATIVE_TRUE@ $(GOLINK) $(go_cmd_cgo_files) zdefaultcc.go $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+@NATIVE_TRUE@vet$(EXEEXT): $(go_cmd_vet_files) $(LIBGOTOOL) $(LIBGODEP)
+@NATIVE_TRUE@ $(GOLINK) $(go_cmd_vet_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+@NATIVE_TRUE@buildid$(EXEEXT): $(go_cmd_buildid_files) $(LIBGOTOOL) $(LIBGODEP)
+@NATIVE_TRUE@ $(GOLINK) $(go_cmd_buildid_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+@NATIVE_TRUE@test2json$(EXEEXT): $(go_cmd_test2json_files) $(LIBGOTOOL) $(LIBGODEP)
+@NATIVE_TRUE@ $(GOLINK) $(go_cmd_test2json_files) $(LIBGOTOOL) $(LIBS) $(NET_LIBS)
+
+@NATIVE_TRUE@install-exec-local: $(noinst_PROGRAMS)
@NATIVE_TRUE@ $(MKDIR_P) $(DESTDIR)$(libexecsubdir)
-@NATIVE_TRUE@ rm -f $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
-@NATIVE_TRUE@ $(INSTALL_PROGRAM) cgo$(exeext) $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
+@NATIVE_TRUE@ for f in $(noinst_PROGRAMS); do \
+@NATIVE_TRUE@ rm -f $(DESTDIR)$(libexecsubdir)/$$f; \
+@NATIVE_TRUE@ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(libexecsubdir)/$$f; \
+@NATIVE_TRUE@ done
@NATIVE_TRUE@uninstall-local:
-@NATIVE_TRUE@ rm -f $(DESTDIR)$(libexecsubdir)/cgo$(exeext)
+@NATIVE_TRUE@ for f in $(noinst_PROGRAMS); do \
+@NATIVE_TRUE@ rm -f $(DESTDIR)$(libexecsubdir)/$$f; \
+@NATIVE_TRUE@ done
# 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:
@@ -735,8 +800,8 @@ mostlyclean-local:
@NATIVE_TRUE@ chmod +x $@.tmp
@NATIVE_TRUE@ mv -f $@.tmp $@
-# check-go-tools runs `go test cmd/go` in our environment.
-@NATIVE_TRUE@check-go-tool: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+# check-go-tool runs `go test cmd/go` in our environment.
+@NATIVE_TRUE@check-go-tool: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
@NATIVE_TRUE@ rm -rf check-go-dir cmd_go-testlog
@NATIVE_TRUE@ $(MKDIR_P) check-go-dir/src/cmd/go
@NATIVE_TRUE@ cp $(cmdsrcdir)/go/*.go check-go-dir/src/cmd/go/
@@ -745,6 +810,7 @@ mostlyclean-local:
@NATIVE_TRUE@ cp $(libgodir)/zdefaultcc.go check-go-dir/src/cmd/go/internal/cfg/
@NATIVE_TRUE@ cp -r $(cmdsrcdir)/go/testdata check-go-dir/src/cmd/go/
@NATIVE_TRUE@ cp -r $(cmdsrcdir)/internal check-go-dir/src/cmd/
+@NATIVE_TRUE@ cp $(libgodir)/objabi.go check-go-dir/src/cmd/internal/objabi/
@NATIVE_TRUE@ @abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
@NATIVE_TRUE@ abs_checkdir=`cd check-go-dir && $(PWD_COMMAND)`; \
@NATIVE_TRUE@ echo "cd check-go-dir/src/cmd/go && $(ECHO_ENV) GOPATH=$${abs_checkdir} $(abs_builddir)/go$(EXEEXT) test -test.short -test.v" > cmd_go-testlog
@@ -758,7 +824,7 @@ mostlyclean-local:
# The runtime package is also tested as part of libgo,
# but the runtime tests use the go tool heavily, so testing
# here too will catch more problems.
-@NATIVE_TRUE@check-runtime: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+@NATIVE_TRUE@check-runtime: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
@NATIVE_TRUE@ rm -rf check-runtime-dir runtime-testlog
@NATIVE_TRUE@ $(MKDIR_P) check-runtime-dir
@NATIVE_TRUE@ @abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
@@ -777,7 +843,7 @@ mostlyclean-local:
@NATIVE_TRUE@ grep '^--- ' runtime-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
# check-cgo-test runs `go test misc/cgo/test` in our environment.
-@NATIVE_TRUE@check-cgo-test: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+@NATIVE_TRUE@check-cgo-test: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
@NATIVE_TRUE@ rm -rf cgo-test-dir cgo-testlog
@NATIVE_TRUE@ $(MKDIR_P) cgo-test-dir/misc/cgo
@NATIVE_TRUE@ cp -r $(libgomiscdir)/cgo/test cgo-test-dir/misc/cgo/
@@ -791,7 +857,7 @@ mostlyclean-local:
# check-carchive-test runs `go test misc/cgo/testcarchive/carchive_test.go`
# in our environment.
-@NATIVE_TRUE@check-carchive-test: go$(EXEEXT) cgo$(EXEEXT) check-head check-gccgo check-gcc
+@NATIVE_TRUE@check-carchive-test: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
@NATIVE_TRUE@ rm -rf carchive-test-dir carchive-testlog
@NATIVE_TRUE@ $(MKDIR_P) carchive-test-dir/misc/cgo
@NATIVE_TRUE@ cp -r $(libgomiscdir)/cgo/testcarchive carchive-test-dir/misc/cgo/
@@ -803,11 +869,25 @@ mostlyclean-local:
@NATIVE_TRUE@ (cd carchive-test-dir/misc/cgo/testcarchive && $(abs_builddir)/go$(EXEEXT) test -test.v carchive_test.go) >> carchive-testlog 2>&1 || echo "--- $${fl}: go test misc/cgo/testcarchive (0.00s)" >> carchive-testlog
@NATIVE_TRUE@ grep '^--- ' carchive-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
+# check-vet runs `go test cmd/vet` in our environment.
+@NATIVE_TRUE@check-vet: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc
+@NATIVE_TRUE@ rm -rf check-vet-dir cmd_vet-testlog
+@NATIVE_TRUE@ $(MKDIR_P) check-vet-dir/src/cmd
+@NATIVE_TRUE@ cp -r $(cmdsrcdir)/vet check-vet-dir/src/cmd/
+@NATIVE_TRUE@ @abs_libgodir=`cd $(libgodir) && $(PWD_COMMAND)`; \
+@NATIVE_TRUE@ abs_checkdir=`cd check-vet-dir && $(PWD_COMMAND)`; \
+@NATIVE_TRUE@ echo "cd check-vet-dir/src/cmd/vet && $(ECHO_ENV) GOPATH=$${abs_checkdir} $(abs_builddir)/go$(EXEEXT) test -test.short -test.v" > cmd_vet-testlog
+@NATIVE_TRUE@ $(CHECK_ENV) \
+@NATIVE_TRUE@ GOPATH=`cd check-vet-dir && $(PWD_COMMAND)`; \
+@NATIVE_TRUE@ export GOPATH; \
+@NATIVE_TRUE@ (cd check-vet-dir/src/cmd/vet && $(abs_builddir)/go$(EXEEXT) test -test.short -test.v) >> cmd_vet-testlog 2>&1 || echo "--- $${fl}: go test cmd/vet (0.00s)" >> cmd_vet-testlog
+@NATIVE_TRUE@ grep '^--- ' cmd_vet-testlog | sed -e 's/^--- \(.*\) ([^)]*)$$/\1/' | sort -k 2
+
# The check targets runs the tests and assembles the output files.
-@NATIVE_TRUE@check: check-head check-go-tool check-runtime check-cgo-test check-carchive-test
+@NATIVE_TRUE@check: check-head check-go-tool check-runtime check-cgo-test check-carchive-test check-vet
@NATIVE_TRUE@ @mv gotools.head gotools.sum
@NATIVE_TRUE@ @cp gotools.sum gotools.log
-@NATIVE_TRUE@ @for file in cmd_go-testlog runtime-testlog cgo-testlog carchive-testlog; do \
+@NATIVE_TRUE@ @for file in cmd_go-testlog runtime-testlog cgo-testlog carchive-testlog cmd_vet-testlog; do \
@NATIVE_TRUE@ testname=`echo $${file} | sed -e 's/-testlog//' -e 's|_|/|'`; \
@NATIVE_TRUE@ echo "Running $${testname}" >> gotools.sum; \
@NATIVE_TRUE@ echo "Running $${testname}" >> gotools.log; \
@@ -833,7 +913,7 @@ mostlyclean-local:
@NATIVE_TRUE@ @echo "runtest completed at `date`" >> gotools.log
@NATIVE_TRUE@ @if grep '^FAIL' gotools.sum >/dev/null 2>&1; then exit 1; fi
-@NATIVE_TRUE@.PHONY: check check-head check-go-tool check-runtime check-cgo-test check-carchive-test
+@NATIVE_TRUE@.PHONY: check check-head check-go-tool check-runtime check-cgo-test check-carchive-test check-vet
# For a non-native build we have to build the programs using a
# previously built host (or build -> host) Go compiler. We should