libgo patch committed: Update to Go1.14beta1
Ian Lance Taylor
iant@golang.org
Wed Jan 22 08:13:00 GMT 2020
I've committed a patch to update libgo to Go 1.14beta1. As usual with
these updates the patch is far too large to include in this e-mail
message. I've included the diffs for gccgo-specific files.
Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to
mainline.
Ian
gotools/ChangeLog:
2020-01-21 Ian Lance Taylor <iant@golang.org>
* Makefile.am (gofmt$(EXEEXT)): Link against $(LIBGOTOOL).
(check-go-tool): Copy some vendor directories.
* Makefile.in: Regenerate.
-------------- next part --------------
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a6127013783..dff5fb5bc70 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-a69ad9c7d1b45edcf8062a07d3a3c9b6838c04f8
+c2225a76d1e15f28056596807ebbbc526d4c58da
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 4b2dd58d40a..56d38f57e7d 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -262,7 +262,8 @@ toolexeclibgohash_DATA = \
hash/adler32.gox \
hash/crc32.gox \
hash/crc64.gox \
- hash/fnv.gox
+ hash/fnv.gox \
+ hash/maphash.gox
toolexeclibgohtmldir = $(toolexeclibgodir)/html
@@ -402,6 +403,7 @@ toolexeclibgounicode_DATA = \
noinst_DATA = \
golang.org/x/net/nettest.gox \
internal/cfg.gox \
+ internal/obscuretestdata.gox \
internal/testenv.gox \
internal/trace.gox \
net/internal/socktest.gox \
diff --git a/libgo/configure.ac b/libgo/configure.ac
index d4ee59ca685..07c03bcdf26 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -10,7 +10,7 @@ AC_INIT(package-unused, version-unused,, libgo)
AC_CONFIG_SRCDIR(Makefile.am)
AC_CONFIG_HEADER(config.h)
-libtool_VERSION=15:0:0
+libtool_VERSION=16:0:0
AC_SUBST(libtool_VERSION)
AM_ENABLE_MULTILIB(, ..)
diff --git a/libgo/VERSION b/libgo/VERSION
index e0f726521a4..da5318592de 100644
--- a/libgo/VERSION
+++ b/libgo/VERSION
@@ -1 +1 @@
-go1.13
+go1.14beta1
diff --git a/libgo/check-packages.txt b/libgo/check-packages.txt
index 156a2bd4593..48c4dfdbc91 100644
--- a/libgo/check-packages.txt
+++ b/libgo/check-packages.txt
@@ -3,7 +3,6 @@ archive/zip
bufio
bytes
cmd/go/internal/cache
-cmd/go/internal/dirhash
cmd/go/internal/generate
cmd/go/internal/get
cmd/go/internal/imports
@@ -13,13 +12,10 @@ cmd/go/internal/lockedfile/internal/filelock
cmd/go/internal/modconv
cmd/go/internal/modfetch
cmd/go/internal/modfetch/codehost
-cmd/go/internal/modfile
cmd/go/internal/modload
-cmd/go/internal/module
cmd/go/internal/mvs
cmd/go/internal/par
cmd/go/internal/search
-cmd/go/internal/semver
cmd/go/internal/txtar
cmd/go/internal/work
cmd/internal/buildid
@@ -96,6 +92,7 @@ hash/adler32
hash/crc32
hash/crc64
hash/fnv
+hash/maphash
html
html/template
image
@@ -163,6 +160,8 @@ strings
sync
sync/atomic
syscall
+testing
+testing/iotest
testing/quick
text/scanner
text/tabwriter
diff --git a/libgo/gotool-packages.txt b/libgo/gotool-packages.txt
index b5a3bbda3b8..90521ae0b50 100644
--- a/libgo/gotool-packages.txt
+++ b/libgo/gotool-packages.txt
@@ -5,7 +5,6 @@ cmd/go/internal/cache
cmd/go/internal/cfg
cmd/go/internal/clean
cmd/go/internal/cmdflag
-cmd/go/internal/dirhash
cmd/go/internal/doc
cmd/go/internal/envcmd
cmd/go/internal/fix
@@ -22,23 +21,17 @@ cmd/go/internal/modcmd
cmd/go/internal/modconv
cmd/go/internal/modfetch
cmd/go/internal/modfetch/codehost
-cmd/go/internal/modfile
cmd/go/internal/modget
cmd/go/internal/modinfo
cmd/go/internal/modload
-cmd/go/internal/module
cmd/go/internal/mvs
-cmd/go/internal/note
cmd/go/internal/par
cmd/go/internal/renameio
cmd/go/internal/robustio
cmd/go/internal/run
cmd/go/internal/search
-cmd/go/internal/semver
cmd/go/internal/str
-cmd/go/internal/sumweb
cmd/go/internal/test
-cmd/go/internal/tlog
cmd/go/internal/tool
cmd/go/internal/txtar
cmd/go/internal/version
@@ -47,10 +40,22 @@ cmd/go/internal/web
cmd/go/internal/work
cmd/internal/browser
cmd/internal/buildid
+cmd/internal/diff
cmd/internal/edit
cmd/internal/objabi
cmd/internal/sys
cmd/internal/test2json
+golang.org/x/crypto/ed25519
+golang.org/x/crypto/ed25519/internal/edwards25519
+golang.org/x/mod/internal/lazyregexp
+golang.org/x/mod/modfile
+golang.org/x/mod/module
+golang.org/x/mod/semver
+golang.org/x/mod/sumdb
+golang.org/x/mod/sumdb/dirhash
+golang.org/x/mod/sumdb/note
+golang.org/x/mod/sumdb/tlog
+golang.org/x/mod/zip
golang.org/x/tools/go/analysis
golang.org/x/tools/go/analysis/internal/analysisflags
golang.org/x/tools/go/analysis/internal/facts
@@ -86,3 +91,5 @@ golang.org/x/tools/go/ast/inspector
golang.org/x/tools/go/cfg
golang.org/x/tools/go/types/objectpath
golang.org/x/tools/go/types/typeutil
+golang.org/x/xerrors
+golang.org/x/xerrors/internal
diff --git a/libgo/libgo-packages.txt b/libgo/libgo-packages.txt
index b19747a05b9..2b5fba806c6 100644
--- a/libgo/libgo-packages.txt
+++ b/libgo/libgo-packages.txt
@@ -72,12 +72,12 @@ go/printer
go/scanner
go/token
go/types
+golang.org/x/crypto/chacha20
golang.org/x/crypto/chacha20poly1305
golang.org/x/crypto/cryptobyte
golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
golang.org/x/crypto/hkdf
-golang.org/x/crypto/internal/chacha20
golang.org/x/crypto/internal/subtle
golang.org/x/crypto/poly1305
golang.org/x/net/dns/dnsmessage
@@ -96,6 +96,7 @@ hash/adler32
hash/crc32
hash/crc64
hash/fnv
+hash/maphash
html
html/template
image
@@ -116,6 +117,7 @@ internal/goversion
internal/lazyregexp
internal/lazytemplate
internal/nettrace
+internal/obscuretestdata
internal/oserror
internal/poll
internal/race
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index 5e31f912e0a..a18787671d1 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -27,6 +27,7 @@ struct caller
intgo line;
intgo index;
intgo frames;
+ bool more;
};
/* Collect file/line information for a PC value. If this is called
@@ -40,7 +41,19 @@ callback (void *data, uintptr_t pc __attribute__ ((unused)),
{
struct caller *c = (struct caller *) data;
- c->frames++;
+ /* We want to make sure we return at least one frame. If we already
+ have at least one frame, see if we should skip this one. */
+ if (c->frames > 0
+ && function != NULL
+ && runtime_skipInCallback (function, NULL))
+ return 0;
+
+ /* If we already have a frame, don't increment frames if we should
+ skip that one. */
+ if (c->frames == 0
+ || c->fn.len == 0
+ || !runtime_skipInCallback ((const char *) c->fn.str, NULL))
+ c->frames++;
/* The libbacktrace library says that these strings might disappear,
but with the current implementation they won't. We can't easily
@@ -51,7 +64,16 @@ callback (void *data, uintptr_t pc __attribute__ ((unused)),
c->line = lineno;
if (c->index == 0)
- return 1;
+ {
+ /* If there are more frames after the indexed one, and we should
+ skip this one, then skip it. */
+ if (c->more
+ && c->fn.len > 0
+ && runtime_skipInCallback((const char *) c->fn.str, NULL))
+ return 0;
+
+ return 1;
+ }
if (c->index > 0)
--c->index;
@@ -129,18 +151,21 @@ __go_get_backtrace_state ()
return back_state;
}
-/* Return function/file/line/nframes information for PC. The index parameter
- is the entry on the stack of inlined functions; -1 means the last
- one, with *nframes set to the count of inlined frames for this PC. */
+/* Return function/file/line/nframes information for PC. The index
+ parameter is the entry on the stack of inlined functions; -1 means
+ the last one, with *nframes set to the count of inlined frames for
+ this PC. If index is not -1, more is whether there are more frames
+ after this one. */
static _Bool
-__go_file_line (uintptr pc, int index, String *fn, String *file, intgo *line, intgo *nframes)
+__go_file_line (uintptr pc, int index, bool more, String *fn, String *file, intgo *line, intgo *nframes)
{
struct caller c;
struct backtrace_state *state;
runtime_memclr (&c, sizeof c);
c.index = index;
+ c.more = more;
c.frames = 0;
runtime_xadd (&__go_runtime_in_callers, 1);
state = __go_get_backtrace_state ();
@@ -223,11 +248,11 @@ Caller (intgo skip)
/* Look up the function name, file name, and line number for a PC. */
struct funcfileline_return
-runtime_funcfileline (uintptr targetpc, int32 index)
+runtime_funcfileline (uintptr targetpc, int32 index, bool more)
{
struct funcfileline_return ret;
- if (!__go_file_line (targetpc, index, &ret.retfn, &ret.retfile,
+ if (!__go_file_line (targetpc, index, more, &ret.retfn, &ret.retfile,
&ret.retline, &ret.retframes))
runtime_memclr (&ret, sizeof ret);
return ret;
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index e7d53a32a5f..33956ca4dfc 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -27,8 +27,59 @@ struct callers_data
int index;
int max;
int keep_thunks;
+ int saw_sigtramp;
};
+/* Whether to skip a particular function name in the traceback. This
+ is mostly to keep the output similar to the gc output for
+ runtime.Caller(N).
+
+ See also similar code in runtime/mprof.go that strips out such
+ functions for block/mutex/memory profiles. */
+
+bool
+runtime_skipInCallback(const char *function, struct callers_data *arg)
+{
+ const char *p;
+
+ /* Skip thunks and recover functions. There is no equivalent to
+ these functions in the gc toolchain. */
+
+ p = function + __builtin_strlen (function);
+ while (p > function && p[-1] >= '0' && p[-1] <= '9')
+ --p;
+ if (p - function > 7 && __builtin_strncmp (p - 7, "..thunk", 7) == 0)
+ return true;
+ if (p - function > 3 && __builtin_strcmp (p - 3, "..r") == 0)
+ return true;
+ if (p - function > 6 && __builtin_strncmp (p - 6, "..stub", 6) == 0)
+ return true;
+
+ /* Skip runtime.deferreturn and runtime.sighandler as the gc
+ compiler has no corresponding function. */
+ if (p - function == sizeof ("runtime.deferreturn") - 1
+ && __builtin_strcmp (function, "runtime.deferreturn") == 0)
+ return true;
+ if (p - function == sizeof ("runtime.sighandler") - 1
+ && __builtin_strcmp (function, "runtime.sighandler") == 0)
+ return true;
+
+ /* Skip the signal handler functions that remain on the stack for us
+ but not for gc. */
+ if ((p - function == sizeof ("runtime.sigtramp") - 1
+ && __builtin_strcmp (function, "runtime.sigtramp") == 0)
+ || (p - function == sizeof ("runtime.sigtrampgo") - 1
+ && __builtin_strcmp (function, "runtime.sigtrampgo") == 0))
+ {
+ /* Also try to skip the signal handler function. */
+ if (arg != NULL)
+ arg->saw_sigtramp = 1;
+ return true;
+ }
+
+ return false;
+}
+
/* Callback function for backtrace_full. Just collect the locations.
Return zero to continue, non-zero to stop. */
@@ -39,6 +90,15 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
struct callers_data *arg = (struct callers_data *) data;
Location *loc;
+ /* Skip an unnamed function above sigtramp. It is likely the signal
+ handler function. */
+ if (arg->saw_sigtramp)
+ {
+ arg->saw_sigtramp = 0;
+ if (function == NULL)
+ return 0;
+ }
+
/* Skip split stack functions. */
if (function != NULL)
{
@@ -61,25 +121,10 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
return 0;
}
- /* Skip thunks and recover functions. There is no equivalent to
- these functions in the gc toolchain, so returning them here means
- significantly different results for runtime.Caller(N). See also
- similar code in runtime/mprof.go that strips out such functions
- for block/mutex/memory profiles. */
- if (function != NULL && !arg->keep_thunks)
- {
- const char *p;
-
- p = function + __builtin_strlen (function);
- while (p > function && p[-1] >= '0' && p[-1] <= '9')
- --p;
- if (p - function > 7 && __builtin_strncmp (p - 7, "..thunk", 7) == 0)
- return 0;
- if (p - function > 3 && __builtin_strcmp (p - 3, "..r") == 0)
- return 0;
- if (p - function > 6 && __builtin_strncmp (p - 6, "..stub", 6) == 0)
- return 0;
- }
+ if (function != NULL
+ && !arg->keep_thunks
+ && runtime_skipInCallback (function, arg))
+ return 0;
if (arg->skip > 0)
{
@@ -204,6 +249,7 @@ runtime_callers (int32 skip, Location *locbuf, int32 m, bool keep_thunks)
data.index = 0;
data.max = m;
data.keep_thunks = keep_thunks;
+ data.saw_sigtramp = 0;
runtime_xadd (&__go_runtime_in_callers, 1);
state = __go_get_backtrace_state ();
backtrace_full (state, 0, callback, error_callback, &data);
@@ -248,6 +294,9 @@ Callers (intgo skip, struct __go_open_array pc)
int ret;
int i;
+ if (pc.__count == 0)
+ return 0;
+
/* Note that calling mallocgc here assumes that we are not going to
store any allocated Go pointers in the slice. */
locbuf = (Location *) runtime_mallocgc (pc.__count * sizeof (Location),
diff --git a/libgo/runtime/go-nanotime.c b/libgo/runtime/go-nanotime.c
index d221847adac..c7adfffb4f5 100644
--- a/libgo/runtime/go-nanotime.c
+++ b/libgo/runtime/go-nanotime.c
@@ -8,11 +8,11 @@
#include "runtime.h"
-int64 runtime_nanotime (void)
+int64 runtime_nanotime1 (void)
__attribute__ ((no_split_stack));
int64
-runtime_nanotime (void)
+runtime_nanotime1 (void)
{
struct timespec ts;
diff --git a/libgo/runtime/go-now.c b/libgo/runtime/go-now.c
index a45890bfd5a..1c02e5220e4 100644
--- a/libgo/runtime/go-now.c
+++ b/libgo/runtime/go-now.c
@@ -8,7 +8,7 @@
#include "runtime.h"
-// Return current time. This is the implementation of time.walltime().
+// Return current time. This is the implementation of time.walltime1().
struct walltime_ret
{
@@ -16,7 +16,7 @@ struct walltime_ret
int32_t nsec;
};
-struct walltime_ret now(void) __asm__ (GOSYM_PREFIX "runtime.walltime")
+struct walltime_ret now(void) __asm__ (GOSYM_PREFIX "runtime.walltime1")
__attribute__ ((no_split_stack));
struct walltime_ret
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index 89134c1d0e0..f46eaea07b9 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -283,8 +283,11 @@ void runtime_entersyscallblock()
__asm__ (GOSYM_PREFIX "runtime.entersyscallblock");
G* __go_go(uintptr, void*);
int32 runtime_callers(int32, Location*, int32, bool keep_callers);
-int64 runtime_nanotime(void) // monotonic time
- __asm__(GOSYM_PREFIX "runtime.nanotime");
+struct callers_data;
+bool runtime_skipInCallback(const char *, struct callers_data *)
+ __asm__ (GOSYM_PREFIX "runtime.skipInCallback");
+int64 runtime_nanotime1(void) // monotonic time
+ __asm__(GOSYM_PREFIX "runtime.nanotime1");
void runtime_dopanic(int32) __attribute__ ((noreturn));
void runtime_startpanic(void)
__asm__ (GOSYM_PREFIX "runtime.startpanic");
@@ -464,7 +467,7 @@ struct funcfileline_return
};
struct funcfileline_return
-runtime_funcfileline (uintptr targetpc, int32 index)
+runtime_funcfileline (uintptr targetpc, int32 index, bool more)
__asm__ (GOSYM_PREFIX "runtime.funcfileline");
/*
diff --git a/libgo/runtime/runtime_c.c b/libgo/runtime/runtime_c.c
index 7531431342c..e7951a051a6 100644
--- a/libgo/runtime/runtime_c.c
+++ b/libgo/runtime/runtime_c.c
@@ -134,16 +134,22 @@ int32 go_read(int32, void *, int32)
int32
go_read(int32 fd, void *p, int32 n)
{
- return runtime_read(fd, p, n);
+ ssize_t r = runtime_read(fd, p, n);
+ if (r < 0)
+ r = - errno;
+ return (int32)r;
}
-int32 go_write(uintptr, void *, int32)
- __asm__ (GOSYM_PREFIX "runtime.write");
+int32 go_write1(uintptr, void *, int32)
+ __asm__ (GOSYM_PREFIX "runtime.write1");
int32
-go_write(uintptr fd, void *p, int32 n)
+go_write1(uintptr fd, void *p, int32 n)
{
- return runtime_write(fd, p, n);
+ ssize_t r = runtime_write(fd, p, n);
+ if (r < 0)
+ r = - errno;
+ return (int32)r;
}
int32 go_closefd(int32)
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 6929de34ba0..de4a392b8cd 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -305,7 +305,7 @@ x)
"") ;;
$goarch) ;;
$goos) ;;
- aix | android | darwin | dragonfly | freebsd | hurd | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ aix | android | darwin | dragonfly | freebsd | hurd | illumos | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le·| nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64 | wasm)
@@ -317,7 +317,7 @@ x)
"") ;;
$goarch) ;;
$goos) ;;
- aix | android | darwin | dragonfly | freebsd | hurd | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ aix | android | darwin | dragonfly | freebsd | hurd | illumos | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le·| nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64 | wasm)
@@ -624,7 +624,9 @@ exampleoutput() {
echo 'import _ "./_xtest_"'
fi
fi
- echo 'import "testing"'
+ if test "$package" != "testing"; then
+ echo 'import "testing"'
+ fi
echo 'import "testing/internal/testdeps"'
if ! test -n "$testmain"; then
echo 'import __os__ "os"'
diff --git a/libgo/match.sh b/libgo/match.sh
index 281acf7ae13..cd35942f8bc 100755
--- a/libgo/match.sh
+++ b/libgo/match.sh
@@ -113,7 +113,7 @@ for f in $gofiles; do
"") ;;
$goarch) ;;
$goos) ;;
- aix | android | darwin | dragonfly | freebsd | hurd | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ aix | android | darwin | dragonfly | freebsd | illumos | hurd | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64 | wasm)
@@ -125,7 +125,7 @@ for f in $gofiles; do
"") ;;
$goarch) ;;
$goos) ;;
- aix | android | darwin | dragonfly | freebsd | hurd | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ aix | android | darwin | dragonfly | freebsd | hurd | illumos | js | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64 | wasm)
diff --git a/libgo/merge.sh b/libgo/merge.sh
index 7138891cd61..b15189e5c4a 100755
--- a/libgo/merge.sh
+++ b/libgo/merge.sh
@@ -128,7 +128,7 @@ echo ${rev} > VERSION
(cd ${NEWDIR}/src && find . -name '*.go' -print) | while read f; do
skip=false
case "$f" in
- ./cmd/buildid/* | ./cmd/cgo/* | ./cmd/go/* | ./cmd/gofmt/* | ./cmd/testjson/* | ./cmd/vet/* | ./cmd/internal/browser/* | ./cmd/internal/buildid/* | ./cmd/internal/edit/* | ./cmd/internal/objabi/* | ./cmd/internal/testj2on/* | ./cmd/internal/sys/* | ./cmd/vendor/golang.org/x/tools/* )
+ ./cmd/buildid/* | ./cmd/cgo/* | ./cmd/go/* | ./cmd/gofmt/* | ./cmd/testjson/* | ./cmd/vet/* | ./cmd/internal/browser/* | ./cmd/internal/buildid/* | ./cmd/internal/edit/* | ./cmd/internal/objabi/* | ./cmd/internal/testj2on/* | ./cmd/internal/sys/* | ./cmd/vendor/golang.org/x/tools/* | ./cmd/vendor/golang.org/x/mod/* | ./cmd/vendor/golang.org/x/xerrors/* | ./cmd/vendor/golang.org/x/crypto/ed25519)
;;
./cmd/*)
skip=true
@@ -150,7 +150,7 @@ done
(cd ${NEWDIR}/src && find . -name testdata -print) | while read d; do
skip=false
case "$d" in
- ./cmd/buildid/* | ./cmd/cgo/* | ./cmd/go/* | ./cmd/gofmt/* | ./cmd/testjson/* | ./cmd/vet/* | ./cmd/internal/browser/* | ./cmd/internal/buildid/* | ./cmd/internal/edit/* | ./cmd/internal/objabi/* | ./cmd/internal/testj2on/* | ./cmd/internal/sys/* | ./cmd/vendor/golang.org/x/tools/* )
+ ./cmd/buildid/* | ./cmd/cgo/* | ./cmd/go/* | ./cmd/gofmt/* | ./cmd/testjson/* | ./cmd/vet/* | ./cmd/internal/browser/* | ./cmd/internal/buildid/* | ./cmd/internal/diff/* | | ./cmd/internal/edit/* | ./cmd/internal/objabi/* | ./cmd/internal/testj2on/* | ./cmd/internal/sys/* | ./cmd/vendor/golang.org/x/tools/* )
;;
./cmd/*)
skip=true
@@ -165,7 +165,7 @@ done
oldtd=${OLDDIR}/src/$d
newtd=${NEWDIR}/src/$d
- libgofile=go/`echo $d | sed -e 's|cmd/vendor/|/|' | sed -e 's|/vendor/|/|'`
+ libgotd=go/`echo $d | sed -e 's|cmd/vendor/|/|' | sed -e 's|/vendor/|/|'`
if ! test -d ${oldtd}; then
echo "merge.sh: $d: NEWDIR"
continue
diff --git a/gotools/Makefile.am b/gotools/Makefile.am
index d36b61ca88e..47adf9bafeb 100644
--- a/gotools/Makefile.am
+++ b/gotools/Makefile.am
@@ -116,7 +116,7 @@ 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)
+ $(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)
@@ -215,6 +215,10 @@ check-go-tool: go$(EXEEXT) $(noinst_PROGRAMS) 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/
+ $(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)`; \
More information about the Gcc-patches
mailing list