diff mbox

libgo patch committed: Update to 1.7rc3

Message ID CAOyqgcVoQq5cYJi9fs--3EnkH9WVTZEY6HO4fCiiAW_ktETQZw@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor July 22, 2016, 6:15 p.m. UTC
I have committed a patch to update libgo to the 1.7rc3 release
candidate.  This is very close to the upcoming 1.7 release.  As usual
with libgo updates, the patch is too large to include in this e-mail
message.  I've appended the changes to the gccgo-specific directories.

Ian

Comments

Lynn A. Boger July 25, 2016, 3:57 p.m. UTC | #1
libgo version bump to indicate the change in Go version?


On 07/22/2016 01:15 PM, Ian Lance Taylor wrote:
> I have committed a patch to update libgo to the 1.7rc3 release
> candidate.  This is very close to the upcoming 1.7 release.  As usual
> with libgo updates, the patch is too large to include in this e-mail
> message.  I've appended the changes to the gccgo-specific directories.
>
> Ian
diff mbox

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 238618)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-4c88f31a83ca28963d29d6dc9fcdb2e9b093610c
+b156d71ad75a1b73d0ed805a5370a297648d9270
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/MERGE
===================================================================
--- libgo/MERGE	(revision 236804)
+++ libgo/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-f5cf5673590a68c55b2330df9dfcdd6fac75b893
+8707f31c0abc6b607014e843b7cc188b3019daa9
 
 The first line of this file holds the git revision number of the
 last merge done from the master library sources.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am	(revision 236804)
+++ libgo/Makefile.am	(working copy)
@@ -111,6 +111,7 @@  endif
 toolexeclibgo_DATA = \
 	bufio.gox \
 	bytes.gox \
+	context.gox \
 	crypto.gox \
 	encoding.gox \
 	errors.gox \
@@ -315,6 +316,7 @@  toolexeclibgonethttp_DATA = \
 	net/http/cookiejar.gox \
 	net/http/fcgi.gox \
 	net/http/httptest.gox \
+	net/http/httptrace.gox \
 	net/http/httputil.gox \
 	net/http/pprof.gox
 
@@ -593,6 +595,9 @@  go_bytes_files = \
 go_bytes_c_files = \
 	go/bytes/indexbyte.c
 
+go_context_files = \
+	go/context/context.go
+
 go_crypto_files = \
 	go/crypto/crypto.go
 
@@ -776,15 +781,19 @@  if LIBGO_IS_LINUX
 go_net_interface_file = go/net/interface_linux.go
 else
 if LIBGO_IS_NETBSD
-go_net_interface_file = go/net/interface_netbsd.go
+go_net_interface_file = go/net/interface_bsdvar.go
 else
 if LIBGO_IS_DRAGONFLY
-go_net_interface_file = go/net/interface_dragonfly.go
+go_net_interface_file = go/net/interface_bsdvar.go
+else
+if LIBGO_IS_OPENBSD
+go_net_interface_file = go/net/interface_bsdvar.go
 else
 go_net_interface_file = go/net/interface_stub.go
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_LINUX
 go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
@@ -845,6 +854,7 @@  go_net_common_files = \
 	go/net/nss.go \
 	go/net/parse.go \
 	go/net/pipe.go \
+	go/net/port.go \
 	go/net/fd_poll_runtime.go \
 	go/net/port_unix.go \
 	$(go_net_sendfile_file) \
@@ -991,6 +1001,20 @@  endif
 endif
 endif
 
+if LIBGO_IS_LINUX
+go_os_wait_file = go/os/wait_waitid.go
+else
+if LIBGO_IS_DARWIN
+go_os_wait_file = go/os/wait_waitid.go
+else
+if LIBGO_IS_FREEBSD
+go_os_wait_file = go/os/wait_wait6.go
+else
+go_os_wait_file = go/os/wait_unimp.go
+endif
+endif
+endif
+
 go_os_files = \
 	$(go_os_dir_file) \
 	go/os/dir.go \
@@ -1016,7 +1040,8 @@  go_os_files = \
 	$(go_os_sys_file) \
 	$(go_os_cloexec_file) \
 	go/os/types.go \
-	go/os/types_unix.go
+	go/os/types_unix.go \
+	$(go_os_wait_file)
 
 go_path_files = \
 	go/path/match.go \
@@ -1048,6 +1073,7 @@  go_runtime_files = \
 	go/runtime/error.go \
 	go/runtime/extern.go \
 	go/runtime/mem.go \
+	go/runtime/symtab.go \
 	version.go
 
 version.go: s-version; @true
@@ -1134,6 +1160,7 @@  go_testing_files = \
 	go/testing/benchmark.go \
 	go/testing/cover.go \
 	go/testing/example.go \
+	go/testing/match.go \
 	go/testing/testing.go
 
 go_time_files = \
@@ -1174,6 +1201,7 @@  endif
 
 go_archive_tar_files = \
 	go/archive/tar/common.go \
+	go/archive/tar/format.go \
 	go/archive/tar/reader.go \
 	go/archive/tar/stat_unix.go \
 	go/archive/tar/writer.go \
@@ -1192,8 +1220,9 @@  go_compress_bzip2_files = \
 	go/compress/bzip2/move_to_front.go
 
 go_compress_flate_files = \
-	go/compress/flate/copy.go \
 	go/compress/flate/deflate.go \
+	go/compress/flate/deflatefast.go \
+	go/compress/flate/dict_decoder.go \
 	go/compress/flate/huffman_bit_writer.go \
 	go/compress/flate/huffman_code.go \
 	go/compress/flate/inflate.go \
@@ -1225,7 +1254,8 @@  go_crypto_aes_files = \
 	go/crypto/aes/block.go \
 	go/crypto/aes/cipher.go \
 	go/crypto/aes/cipher_generic.go \
-	go/crypto/aes/const.go
+	go/crypto/aes/const.go \
+	go/crypto/aes/modes.go
 go_crypto_cipher_files = \
 	go/crypto/cipher/cbc.go \
 	go/crypto/cipher/cfb.go \
@@ -1257,8 +1287,12 @@  go_crypto_md5_files = \
 if LIBGO_IS_LINUX
 crypto_rand_file = go/crypto/rand/rand_linux.go
 else
+if LIBGO_IS_OPENBSD
+crypto_rand_file = go/crypto/rand/rand_openbsd.go
+else
 crypto_rand_file =
 endif
+endif
 
 go_crypto_rand_files = \
 	go/crypto/rand/eagain.go \
@@ -1280,10 +1314,12 @@  go_crypto_sha1_files = \
 	go/crypto/sha1/sha1block_generic.go
 go_crypto_sha256_files = \
 	go/crypto/sha256/sha256.go \
-	go/crypto/sha256/sha256block.go
+	go/crypto/sha256/sha256block.go \
+	go/crypto/sha256/sha256block_generic.go
 go_crypto_sha512_files = \
 	go/crypto/sha512/sha512.go \
-	go/crypto/sha512/sha512block.go
+	go/crypto/sha512/sha512block.go \
+	go/crypto/sha512/sha512block_generic.go
 go_crypto_subtle_files = \
 	go/crypto/subtle/constant_time.go
 go_crypto_tls_files = \
@@ -1375,7 +1411,10 @@  go_debug_macho_files = \
 	go/debug/macho/macho.go
 go_debug_pe_files = \
 	go/debug/pe/file.go \
-	go/debug/pe/pe.go
+	go/debug/pe/pe.go \
+	go/debug/pe/section.go \
+	go/debug/pe/string.go \
+	go/debug/pe/symbol.go
 go_debug_plan9obj_files = \
 	go/debug/plan9obj/file.go \
 	go/debug/plan9obj/plan9obj.go
@@ -1517,6 +1556,87 @@  go_go_internal_gccgoimporter_files = \
 	go/go/internal/gccgoimporter/importer.go \
 	go/go/internal/gccgoimporter/parser.go
 
+go_golang_org_x_net_http2_hpack_files = \
+	go/golang_org/x/net/http2/hpack/encode.go \
+	go/golang_org/x/net/http2/hpack/hpack.go \
+	go/golang_org/x/net/http2/hpack/huffman.go \
+	go/golang_org/x/net/http2/hpack/tables.go
+
+go_golang_org_x_net_lex_httplex_files = \
+	go/golang_org/x/net/lex/httplex/httplex.go
+
+if LIBGO_IS_BSD
+
+if LIBGO_IS_DARWIN
+x_net_route_files =
+	go/golang_org/x/net/route/interface_classic.go \
+	go/golang_org/x/net/route/interface_multicast.go \
+	go/golang_org/x/net/route/route_classic.go \
+	go/golang_org/x/net/route/sys_darwin.go \
+	go/golang_org/x/net/route/zsys_darwin.go
+endif
+if LIBGO_IS_DRAGONFLY
+x_net_route_files =
+	go/golang_org/x/net/route/interface_announce.go \
+	go/golang_org/x/net/route/interface_classic.go \
+	go/golang_org/x/net/route/interface_multicast.go \
+	go/golang_org/x/net/route/route_classic.go \
+	go/golang_org/x/net/route/sys_dragonfly.go \
+	go/golang_org/x/net/route/zsys_dragonfly.go
+endif
+if LIBGO_IS_FREEBSD
+if LIBGO_IS_386
+x_net_route_freebsd_file =
+	go/golang_org/x/net/route/zsys_freebsd_386.go
+endif
+if LIBGO_IS_X86_64
+x_net_route_freebsd_file =
+	go/golang_org/x/net/route/zsys_freebsd_amd64.go
+endif
+if LIBGO_IS_ARM
+x_net_route_freebsd_file =
+	go/golang_org/x/net/route/zsys_freebsd_arm.go
+endif
+x_net_route_files =
+	go/golang_org/x/net/route/interface_announce.go \
+	go/golang_org/x/net/route/interface_freebsd.go \
+	go/golang_org/x/net/route/interface_multicast.go \
+	go/golang_org/x/net/route/route_classic.go \
+	go/golang_org/x/net/route/sys_freebsd.go \
+	$(x_net_route_freebsd_file)
+endif
+if LIBGO_IS_NETBSD
+x_net_route_files =
+	go/golang_org/x/net/route/interface_announce.go \
+	go/golang_org/x/net/route/interface_classic.go \
+	go/golang_org/x/net/route/route_classic.go \
+	go/golang_org/x/net/route/sys_netbsd.go \
+	go/golang_org/x/net/route/zsys_netbsd.go
+endif
+if LIBGO_IS_OPENBSD
+x_net_route_files =
+	go/golang_org/x/net/route/route_openbsd.go \
+	go/golang_org/x/net/route/sys_openbsd.go \
+	go/golang_org/x/net/route/zsys_openbsd.go
+endif
+
+go_golang_org_x_net_route_files = \
+	go/golang_org/x/net/route/address.go \
+	go/golang_org/x/net/route/binary.go \
+	go/golang_org/x/net/route/interface.go \
+	go/golang_org/x/net/route/message.go \
+	go/golang_org/x/net/route/route.go \
+	go/golang_org/x/net/route/syscall.go \
+	go/golang_org/x/net/route/sys.go \
+	$(x_net_route_files)
+
+golang_org_x_net_route_lo = \
+	golang_org/x/net/route/route.lo
+golang_org_x_net_route_check = \
+	golang_org/x/net/route/check
+
+endif
+
 go_hash_adler32_files = \
 	go/hash/adler32/adler32.go
 go_hash_crc32_files = \
@@ -1576,11 +1696,8 @@  go_index_suffixarray_files = \
 	go/index/suffixarray/qsufsort.go \
 	go/index/suffixarray/suffixarray.go
 
-go_internal_golang_org_x_net_http2_hpack_files = \
-	go/internal/golang.org/x/net/http2/hpack/encode.go \
-	go/internal/golang.org/x/net/http2/hpack/hpack.go \
-	go/internal/golang.org/x/net/http2/hpack/huffman.go \
-	go/internal/golang.org/x/net/http2/hpack/tables.go
+go_internal_nettrace_files = \
+	go/internal/nettrace/nettrace.go
 go_internal_race_files = \
 	go/internal/race/doc.go \
 	go/internal/race/norace.go
@@ -1603,15 +1720,23 @@  else
 if LIBGO_IS_MIPS64
 internal_syscall_unix_getrandom_files = go/internal/syscall/unix/getrandom_linux.go go/internal/syscall/unix/getrandom_linux_mips64x.go
 else
+if LIBGO_IS_S390X
+internal_syscall_unix_getrandom_files = go/internal/syscall/unix/getrandom_linux.go go/internal/syscall/unix/getrandom_linux_s390x.go
+else
 internal_syscall_unix_getrandom_files = go/internal/syscall/unix/getrandom_linux.go go/internal/syscall/unix/getrandom_linux_generic.go
 endif
 endif
 endif
 endif
 endif
+endif
+else
+if LIBGO_IS_OPENBSD
+internal_syscall_unix_getrandom_files = go/internal/syscall/unix/getentropy_openbsd.go
 else
 internal_syscall_unix_getrandom_files =
 endif
+endif
 
 go_internal_syscall_unix_files = \
 	go/internal/syscall/unix/dummy.go \
@@ -1621,6 +1746,7 @@  go_internal_testenv_files = \
 	go/internal/testenv/testenv.go
 go_internal_trace_files = \
 	go/internal/trace/goroutines.go \
+	go/internal/trace/order.go \
 	go/internal/trace/parser.go
 
 go_io_ioutil_files = \
@@ -1684,8 +1810,8 @@  go_net_http_files = \
 	go/net/http/fs.go \
 	go/net/http/h2_bundle.go \
 	go/net/http/header.go \
+	go/net/http/http.go \
 	go/net/http/jar.go \
-	go/net/http/lex.go \
 	go/net/http/method.go \
 	go/net/http/request.go \
 	go/net/http/response.go \
@@ -1718,10 +1844,13 @@  go_net_http_fcgi_files = \
 	go/net/http/fcgi/child.go \
 	go/net/http/fcgi/fcgi.go
 go_net_http_httptest_files = \
+	go/net/http/httptest/httptest.go \
 	go/net/http/httptest/recorder.go \
 	go/net/http/httptest/server.go
 go_net_http_pprof_files = \
 	go/net/http/pprof/pprof.go
+go_net_http_httptrace_files = \
+	go/net/http/httptrace/trace.go
 go_net_http_httputil_files = \
 	go/net/http/httputil/dump.go \
 	go/net/http/httputil/httputil.go \
@@ -1768,15 +1897,18 @@  go_os_signal_files = \
 
 if LIBGO_IS_SOLARIS
 os_user_decls_file = go/os/user/decls_solaris.go
+os_user_listgroups_file = go/os/user/listgroups_solaris.go
 else
 os_user_decls_file = go/os/user/decls_unix.go
+os_user_listgroups_file = go/os/user/listgroups_unix.go
 endif
 
 go_os_user_files = \
 	go/os/user/lookup.go \
 	go/os/user/lookup_unix.go \
 	go/os/user/user.go \
-	$(os_user_decls_file)
+	$(os_user_decls_file) \
+	$(os_user_listgroups_file)
 
 go_path_filepath_files = \
 	go/path/filepath/match.go \
@@ -2147,6 +2279,7 @@  libgo_go_objs = \
 	bufio.lo \
 	bytes.lo \
 	bytes/index.lo \
+	context.lo \
 	crypto.lo \
 	encoding.lo \
 	errors.lo \
@@ -2242,6 +2375,9 @@  libgo_go_objs = \
 	go/scanner.lo \
 	go/token.lo \
 	go/types.lo \
+	golang_org/x/net/http2/hpack.lo \
+	golang_org/x/net/lex/httplex.lo \
+	$(golang_org_x_net_route_lo) \
 	hash/adler32.lo \
 	hash/crc32.lo \
 	hash/crc64.lo \
@@ -2250,6 +2386,7 @@  libgo_go_objs = \
 	net/http/cookiejar.lo \
 	net/http/fcgi.lo \
 	net/http/httptest.lo \
+	net/http/httptrace.lo \
 	net/http/httputil.lo \
 	net/http/internal.lo \
 	net/http/pprof.lo \
@@ -2261,7 +2398,7 @@  libgo_go_objs = \
 	image/jpeg.lo \
 	image/png.lo \
 	index/suffixarray.lo \
-	internal/golang.org/x/net/http2/hpack.lo \
+	internal/nettrace.lo \
 	internal/race.lo \
 	internal/singleflight.lo \
 	internal/syscall/unix.lo \
@@ -2460,6 +2597,15 @@  bytes/check: $(CHECK_DEPS)
 	@$(CHECK)
 .PHONY: bytes/check
 
+@go_include@ context.lo.dep
+context.lo.dep: $(go_context_files)
+	$(BUILDDEPS)
+context.lo: $(go_context_files)
+	$(BUILDPACKAGE)
+context/check: $(CHECK_DEPS)
+	@$(CHECK)
+.PHONY: context/check
+
 @go_include@ crypto.lo.dep
 crypto.lo.dep: $(go_crypto_files)
 	$(BUILDDEPS)
@@ -3275,6 +3421,35 @@  go/internal/gccgoimporter/check: $(CHECK
 	@$(CHECK)
 .PHONY: go/internal/gccgoimporter/check
 
+@go_include@ golang_org/x/net/http2/hpack.lo.dep
+golang_org/x/net/http2/hpack.lo.dep: $(go_golang_org_x_net_http2_hpack_files)
+	$(BUILDDEPS)
+golang_org/x/net/http2/hpack.lo: $(go_golang_org_x_net_http2_hpack_files)
+	$(BUILDPACKAGE)
+golang_org/x/net/http2/hpack/check: $(CHECK_DEPS)
+	@$(CHECK)
+.PHONY: golang_org/x/net/http2/hpack/check
+
+@go_include@ golang_org/x/net/lex/httplex.lo.dep
+golang_org/x/net/lex/httplex.lo.dep: $(go_golang_org_x_net_lex_httplex_files)
+	$(BUILDDEPS)
+golang_org/x/net/lex/httplex.lo: $(go_golang_org_x_net_lex_httplex_files)
+	$(BUILDPACKAGE)
+golang_org/x/net/lex/httplex/check: $(CHECK_DEPS)
+	@$(CHECK)
+.PHONY: golang_org/x/net/lex/httplex/check
+
+if LIBGO_IS_BSD
+@go_include@ golang_org/x/net/route.lo.dep
+golang_org/x/net/route.lo.dep: $(go_golang_org_x_net_route_files)
+	$(BUILDDEPS)
+golang_org/x/net/route.lo: $(go_golang_org_x_net_route_files)
+	$(BUILDPACKAGE)
+golang_org/x/net/route/check: $(CHECK_DEPS)
+	@$(CHECK)
+endif
+.PHONY: golang_org/x/net/route/check
+
 @go_include@ hash/adler32.lo.dep
 hash/adler32.lo.dep: $(go_hash_adler32_files)
 	$(BUILDDEPS)
@@ -3383,14 +3558,14 @@  index/suffixarray/check: $(CHECK_DEPS)
 	@$(CHECK)
 .PHONY: index/suffixarray/check
 
-@go_include@ internal/golang.org/x/net/http2/hpack.lo.dep
-internal/golang.org/x/net/http2/hpack.lo.dep: $(go_internal_golang_org_x_net_http2_hpack_files)
+@go_include@ internal/nettrace.lo.dep
+internal/nettrace.lo.dep: $(go_internal_nettrace_files)
 	$(BUILDDEPS)
-internal/golang.org/x/net/http2/hpack.lo: $(go_internal_golang_org_x_net_http2_hpack_files)
+internal/nettrace.lo: $(go_internal_nettrace_files)
 	$(BUILDPACKAGE)
-internal/golang.org/x/net/http2/hpack/check: $(CHECK_DEPS)
+internal/nettrace/check: $(CHECK_DEPS)
 	@$(CHECK)
-.PHONY: internal/golang.org/x/net/http2/hpack/check
+.PHONY: internal/nettrace/check
 
 @go_include@ internal/race.lo.dep
 internal/race.lo.dep: $(go_internal_race_files)
@@ -3593,6 +3768,15 @@  net/http/httptest/check: $(check_deps)
 	@$(CHECK)
 .PHONY: net/http/httptest/check
 
+@go_include@ net/http/httptrace.lo.dep
+net/http/httptrace.lo.dep: $(go_net_http_httptrace_files)
+	$(BUILDDEPS)
+net/http/httptrace.lo: $(go_net_http_httptrace_files)
+	$(BUILDPACKAGE)
+net/http/httptrace/check: $(check_deps)
+	@$(CHECK)
+.PHONY: net/http/httptrace/check
+
 @go_include@ net/http/httputil.lo.dep
 net/http/httputil.lo.dep: $(go_net_http_httputil_files)
 	$(BUILDDEPS)
@@ -3833,6 +4017,8 @@  bufio.gox: bufio.lo
 	$(BUILDGOX)
 bytes.gox: bytes.lo
 	$(BUILDGOX)
+context.gox: context.lo
+	$(BUILDGOX)
 crypto.gox: crypto.lo
 	$(BUILDGOX)
 encoding.gox: encoding.lo
@@ -4027,6 +4213,17 @@  go/internal/gcimporter.gox: go/internal/
 go/internal/gccgoimporter.gox: go/internal/gccgoimporter.lo
 	$(BUILDGOX)
 
+golang_org/x/net/http2/hpack.gox: golang_org/x/net/http2/hpack.lo
+	$(BUILDGOX)
+
+golang_org/x/net/lex/httplex.gox: golang_org/x/net/lex/httplex.lo
+	$(BUILDGOX)
+
+if LIBGO_IS_BSD
+golang_org/x/net/route.gox: golang_org/x/net/route.lo
+	$(BUILDGOX)
+endif
+
 hash/adler32.gox: hash/adler32.lo
 	$(BUILDGOX)
 hash/crc32.gox: hash/crc32.lo
@@ -4055,7 +4252,7 @@  image/color/palette.gox: image/color/pal
 index/suffixarray.gox: index/suffixarray.lo
 	$(BUILDGOX)
 
-internal/golang.org/x/net/http2/hpack.gox: internal/golang.org/x/net/http2/hpack.lo
+internal/nettrace.gox: internal/nettrace.lo
 	$(BUILDGOX)
 internal/race.gox: internal/race.lo
 	$(BUILDGOX)
@@ -4107,6 +4304,8 @@  net/http/fcgi.gox: net/http/fcgi.lo
 	$(BUILDGOX)
 net/http/httptest.gox: net/http/httptest.lo
 	$(BUILDGOX)
+net/http/httptrace.gox: net/http/httptrace.lo
+	$(BUILDGOX)
 net/http/httputil.gox: net/http/httputil.lo
 	$(BUILDGOX)
 net/http/pprof.gox: net/http/pprof.lo
@@ -4169,6 +4368,7 @@  unicode/utf8.gox: unicode/utf8.lo
 TEST_PACKAGES = \
 	bufio/check \
 	bytes/check \
+	context/check \
 	errors/check \
 	expvar/check \
 	flag/check \
@@ -4252,6 +4452,9 @@  TEST_PACKAGES = \
 	go/scanner/check \
 	go/token/check \
 	go/types/check \
+	golang_org/x/net/http2/hpack/check \
+	golang_org/x/net/lex/httplex/check \
+	$(golang_org_x_net_route_check) \
 	hash/adler32/check \
 	hash/crc32/check \
 	hash/crc64/check \
@@ -4261,7 +4464,6 @@  TEST_PACKAGES = \
 	image/jpeg/check \
 	image/png/check \
 	index/suffixarray/check \
-	internal/golang.org/x/net/http2/hpack/check \
 	internal/singleflight/check \
 	internal/trace/check \
 	io/ioutil/check \
@@ -4276,6 +4478,7 @@  TEST_PACKAGES = \
 	net/http/cookiejar/check \
 	net/http/fcgi/check \
 	net/http/httptest/check \
+	net/http/httptrace/check \
 	net/http/httputil/check \
 	net/http/internal/check \
 	net/internal/socktest/check \
Index: libgo/VERSION
===================================================================
--- libgo/VERSION	(revision 236804)
+++ libgo/VERSION	(working copy)
@@ -1 +1 @@ 
-go1.6.1
\ No newline at end of file
+go1.7rc3
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac	(revision 236804)
+++ libgo/configure.ac	(working copy)
@@ -172,6 +172,7 @@  AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $i
 AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
+AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 
 dnl Test whether we need to use DejaGNU or whether we can use the
Index: libgo/merge.sh
===================================================================
--- libgo/merge.sh	(revision 236804)
+++ libgo/merge.sh	(working copy)
@@ -137,15 +137,7 @@  merge_c() {
   fi
 }
 
-if test -f VERSION; then
-  if ! cmp -s ${NEWDIR}/VERSION VERSION; then
-    cp ${NEWDIR}/VERSION .
-  fi
-else
-  if test -f ${NEWDIR}/VERSION; then
-    cp ${NEWDIR}/VERSION .
-  fi
-fi
+echo ${rev} > VERSION
 
 (cd ${NEWDIR}/src && find . -name '*.go' -print) | while read f; do
   oldfile=${OLDDIR}/src/$f
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh	(revision 236804)
+++ libgo/mksysinfo.sh	(working copy)
@@ -97,6 +97,7 @@  cat > sysinfo.c <<EOF
 #include <unistd.h>
 #include <netdb.h>
 #include <pwd.h>
+#include <grp.h>
 #if defined(HAVE_LINUX_FILTER_H)
 #include <linux/filter.h>
 #endif
@@ -428,6 +429,10 @@  if ! grep '^const AF_LOCAL ' ${OUT} >/de
   fi
 fi
 
+# sysconf constants.
+grep '^const __SC' gen-sysinfo.go |
+  sed -e 's/^\(const \)__\(SC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
+
 # pathconf constants.
 grep '^const __PC' gen-sysinfo.go |
   sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
@@ -906,6 +911,12 @@  grep '^type _passwd ' gen-sysinfo.go | \
       -e 's/ pw_/ Pw_/g' \
     >> ${OUT}
 
+# The group struct.
+grep '^type _group ' gen-sysinfo.go | \
+    sed -e 's/_group/Group/' \
+      -e 's/ gr_/ Gr_/g' \
+    >> ${OUT}
+
 # The ioctl flags for the controlling TTY.
 grep '^const _TIOC' gen-sysinfo.go | \
     grep -v '_val =' | \
Index: libgo/runtime/chan.goc
===================================================================
--- libgo/runtime/chan.goc	(revision 236804)
+++ libgo/runtime/chan.goc	(working copy)
@@ -948,7 +948,7 @@  sclose:
 typedef struct runtimeSelect runtimeSelect;
 struct runtimeSelect
 {
-	uintptr dir;
+	intgo dir;
 	ChanType *typ;
 	Hchan *ch;
 	byte *val;
Index: libgo/runtime/chan.h
===================================================================
--- libgo/runtime/chan.h	(revision 236804)
+++ libgo/runtime/chan.h	(working copy)
@@ -17,6 +17,7 @@  struct	SudoG
 	SudoG*	link;
 	int64	releasetime;
 	byte*	elem;		// data element
+	uint32  ticket;
 };
 
 struct	WaitQ
Index: libgo/runtime/go-caller.c
===================================================================
--- libgo/runtime/go-caller.c	(revision 236804)
+++ libgo/runtime/go-caller.c	(working copy)
@@ -25,6 +25,7 @@  struct caller
   String fn;
   String file;
   intgo line;
+  intgo index;
 };
 
 /* Collect file/line information for a PC value.  If this is called
@@ -45,6 +46,12 @@  callback (void *data, uintptr_t pc __att
   c->file = runtime_gostringnocopy ((const byte *) filename);
   c->line = lineno;
 
+  if (c->index == 0)
+    return 1;
+
+  if (c->index > 0)
+    --c->index;
+
   return 0;
 }
 
@@ -102,14 +109,17 @@  __go_get_backtrace_state ()
   return back_state;
 }
 
-/* Return function/file/line information for PC.  */
+/* Return function/file/line information for PC.  The index parameter
+   is the entry on the stack of inlined functions; -1 means the last
+   one.  */
 
 _Bool
-__go_file_line (uintptr pc, String *fn, String *file, intgo *line)
+__go_file_line (uintptr pc, int index, String *fn, String *file, intgo *line)
 {
   struct caller c;
 
   runtime_memclr (&c, sizeof c);
+  c.index = index;
   backtrace_pcinfo (__go_get_backtrace_state (), pc, callback,
 		    error_callback, &c);
   *fn = c.fn;
@@ -186,7 +196,7 @@  FuncForPC (uintptr_t pc)
   intgo line;
   uintptr_t val;
 
-  if (!__go_file_line (pc, &fn, &file, &line))
+  if (!__go_file_line (pc, -1, &fn, &file, &line))
     return NULL;
 
   ret = (Func *) runtime_malloc (sizeof (*ret));
@@ -219,7 +229,7 @@  runtime_funcline_go (Func *f __attribute
   struct funcline_go_return ret;
   String fn;
 
-  if (!__go_file_line (targetpc, &fn, &ret.retfile,  &ret.retline))
+  if (!__go_file_line (targetpc, -1, &fn, &ret.retfile,  &ret.retline))
     runtime_memclr (&ret, sizeof ret);
   return ret;
 }
@@ -245,3 +255,45 @@  runtime_funcentry_go (Func *f)
 {
   return f->entry;
 }
+
+/* Look up file and line information for Frames.Next.  */
+
+struct funcframe_return
+{
+  Func* retfunc;
+  String retfile;
+  intgo retline;
+};
+
+struct funcframe_return
+runtime_funcframe (uintptr pc, int index)
+  __asm__ (GOSYM_PREFIX "runtime.funcframe");
+
+struct funcframe_return
+runtime_funcframe (uintptr pc, int index)
+{
+  struct funcframe_return ret;
+  String fn;
+  Func* func;
+  uintptr_t val;
+
+  // Subtract 1 from PC to undo the 1 we added in callback in go-callers.c.
+  --pc;
+
+  if (!__go_file_line (pc, index, &fn, &ret.retfile, &ret.retline))
+    runtime_memclr (&ret, sizeof ret);
+  else
+    {
+      func = (Func *) runtime_malloc (sizeof (*func));
+      func->name = fn;
+
+      if (__go_symbol_value (pc, &val))
+	func->entry = val;
+      else
+	func->entry = 0;
+
+      ret.retfunc = func;
+    }
+
+  return ret;
+}
Index: libgo/runtime/malloc.goc
===================================================================
--- libgo/runtime/malloc.goc	(revision 236804)
+++ libgo/runtime/malloc.goc	(working copy)
@@ -996,3 +996,7 @@  badfunc:
 throw:
 	runtime_throw("runtime.SetFinalizer");
 }
+
+func KeepAlive(x Eface) {
+	USED(x);
+}
Index: libgo/runtime/proc.c
===================================================================
--- libgo/runtime/proc.c	(revision 236804)
+++ libgo/runtime/proc.c	(working copy)
@@ -686,7 +686,7 @@  runtime_printcreatedby(G *g)
 		String file;
 		intgo line;
 
-		if(__go_file_line(g->gopc - 1, &fn, &file, &line)) {
+		if(__go_file_line(g->gopc - 1, -1, &fn, &file, &line)) {
 			runtime_printf("created by %S\n", fn);
 			runtime_printf("\t%S:%D\n", file, (int64) line);
 		}
Index: libgo/runtime/runtime.h
===================================================================
--- libgo/runtime/runtime.h	(revision 236804)
+++ libgo/runtime/runtime.h	(working copy)
@@ -835,7 +835,7 @@  extern uintptr runtime_stacks_sys;
 
 struct backtrace_state;
 extern struct backtrace_state *__go_get_backtrace_state(void);
-extern _Bool __go_file_line(uintptr, String*, String*, intgo *);
+extern _Bool __go_file_line(uintptr, int, String*, String*, intgo *);
 extern byte* runtime_progname();
 extern void runtime_main(void*);
 extern uint32 runtime_in_callers;
Index: libgo/runtime/sema.goc
===================================================================
--- libgo/runtime/sema.goc	(revision 236804)
+++ libgo/runtime/sema.goc	(working copy)
@@ -19,6 +19,7 @@ 
 
 package sync
 #include "runtime.h"
+#include "chan.h"
 #include "arch.h"
 
 typedef struct SemaWaiter SemaWaiter;
@@ -98,6 +99,13 @@  cansemacquire(uint32 volatile *addr)
 	return 0;
 }
 
+static void readyWithTime(SudoG* s, int traceskip __attribute__ ((unused))) {
+	if (s->releasetime != 0) {
+		s->releasetime = runtime_cputicks();
+	}
+	runtime_ready(s->g);
+}
+
 void
 runtime_semacquire(uint32 volatile *addr, bool profile)
 {
@@ -297,3 +305,167 @@  func runtime_Syncsemrelease(s *SyncSema,
 	} else
 		runtime_unlock(s);
 }
+
+// notifyList is a ticket-based notification list used to implement sync.Cond.
+//
+// It must be kept in sync with the sync package.
+typedef struct {
+	// wait is the ticket number of the next waiter. It is atomically
+	// incremented outside the lock.
+	uint32 wait;
+
+	// notify is the ticket number of the next waiter to be notified. It can
+	// be read outside the lock, but is only written to with lock held.
+	//
+	// Both wait & notify can wrap around, and such cases will be correctly
+	// handled as long as their "unwrapped" difference is bounded by 2^31.
+	// For this not to be the case, we'd need to have 2^31+ goroutines
+	// blocked on the same condvar, which is currently not possible.
+	uint32 notify;
+
+	// List of parked waiters.
+	Lock lock;
+	SudoG* head;
+	SudoG* tail;
+} notifyList;
+
+// less checks if a < b, considering a & b running counts that may overflow the
+// 32-bit range, and that their "unwrapped" difference is always less than 2^31.
+static bool less(uint32 a, uint32 b) {
+	return (int32)(a-b) < 0;
+}
+
+// notifyListAdd adds the caller to a notify list such that it can receive
+// notifications. The caller must eventually call notifyListWait to wait for
+// such a notification, passing the returned ticket number.
+//go:linkname notifyListAdd sync.runtime_notifyListAdd
+func runtime_notifyListAdd(l *notifyList) (r uint32) {
+	// This may be called concurrently, for example, when called from
+	// sync.Cond.Wait while holding a RWMutex in read mode.
+	r = runtime_xadd(&l->wait, 1) - 1;
+}
+
+// notifyListWait waits for a notification. If one has been sent since
+// notifyListAdd was called, it returns immediately. Otherwise, it blocks.
+//go:linkname notifyListWait sync.runtime_notifyListWait
+func runtime_notifyListWait(l *notifyList, t uint32) {
+	SudoG s;
+	int64 t0;
+
+	runtime_lock(&l->lock);
+
+	// Return right away if this ticket has already been notified.
+	if (less(t, l->notify)) {
+		runtime_unlock(&l->lock);
+		return;
+	}
+
+	// Enqueue itself.
+	runtime_memclr(&s, sizeof(s));
+	s.g = runtime_g();
+	s.ticket = t;
+	s.releasetime = 0;
+	t0 = 0;
+	if (runtime_blockprofilerate > 0) {
+		t0 = runtime_cputicks();
+		s.releasetime = -1;
+	}
+	if (l->tail == nil) {
+		l->head = &s;
+	} else {
+		l->tail->link = &s;
+	}
+	l->tail = &s;
+	runtime_parkunlock(&l->lock, "semacquire");
+	if (t0 != 0) {
+		runtime_blockevent(s.releasetime-t0, 2);
+	}
+}
+
+// notifyListNotifyAll notifies all entries in the list.
+//go:linkname notifyListNotifyAll sync.runtime_notifyListNotifyAll
+func runtime_notifyListNotifyAll(l *notifyList) {
+	SudoG *s;
+
+	// Fast-path: if there are no new waiters since the last notification
+	// we don't need to acquire the lock.
+	if (runtime_atomicload(&l->wait) == runtime_atomicload(&l->notify)) {
+		return;
+	}
+
+	// Pull the list out into a local variable, waiters will be readied
+	// outside the lock.
+	runtime_lock(&l->lock);
+	s = l->head;
+	l->head = nil;
+	l->tail = nil;
+
+	// Update the next ticket to be notified. We can set it to the current
+	// value of wait because any previous waiters are already in the list
+	// or will notice that they have already been notified when trying to
+	// add themselves to the list.
+	runtime_atomicstore(&l->notify, runtime_atomicload(&l->wait));
+	runtime_unlock(&l->lock);
+
+	// Go through the local list and ready all waiters.
+	while (s != nil) {
+		SudoG* next = s->link;
+		s->link = nil;
+		readyWithTime(s, 4);
+		s = next;
+	}
+}
+
+// notifyListNotifyOne notifies one entry in the list.
+//go:linkname notifyListNotifyOne sync.runtime_notifyListNotifyOne
+func runtime_notifyListNotifyOne(l *notifyList) {
+	uint32 t;
+	SudoG *p;
+	SudoG *s;
+
+	// Fast-path: if there are no new waiters since the last notification
+	// we don't need to acquire the lock at all.
+	if (runtime_atomicload(&l->wait) == runtime_atomicload(&l->notify)) {
+		return;
+	}
+
+	runtime_lock(&l->lock);
+
+	// Re-check under the lock if we need to do anything.
+	t = l->notify;
+	if (t == runtime_atomicload(&l->wait)) {
+		runtime_unlock(&l->lock);
+		return;
+	}
+
+	// Update the next notify ticket number, and try to find the G that
+	// needs to be notified. If it hasn't made it to the list yet we won't
+	// find it, but it won't park itself once it sees the new notify number.
+	runtime_atomicstore(&l->notify, t+1);
+	for (p = nil, s = l->head; s != nil; p = s, s = s->link) {
+		if (s->ticket == t) {
+			SudoG *n = s->link;
+			if (p != nil) {
+				p->link = n;
+			} else {
+				l->head = n;
+			}
+			if (n == nil) {
+				l->tail = p;
+			}
+			runtime_unlock(&l->lock);
+			s->link = nil;
+			readyWithTime(s, 4);
+			return;
+		}
+	}
+	runtime_unlock(&l->lock);
+}
+
+//go:linkname notifyListCheck sync.runtime_notifyListCheck
+func runtime_notifyListCheck(sz uintptr) {
+	if (sz != sizeof(notifyList)) {
+		runtime_printf("runtime: bad notifyList size\n");
+		runtime_throw("bad notifyList size");
+	}
+}