* libgo patch committed: Update to Go 1.5 release
@ 2015-10-31 3:35 Ian Lance Taylor
2015-11-01 8:40 ` Andreas Schwab
2015-11-06 13:01 ` Rainer Orth
0 siblings, 2 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-10-31 3:35 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
I have committed a patch to libgo to update it to the Go 1.5 release.
As usual for libgo updates, the actual patch is too large to attach to
this e-mail message. I've attached the changes to the gccgo-specific
files.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
This may cause trouble on non-GNU/Linux operating systems. Please let
me know about any problems you encounter.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 50016 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229612)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-16f69a4007a1903da4055a496882b514e05f45f3
+4b6b496579225cdd897130f6d6fd18ecb100bf99
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 228306)
+++ libgo/MERGE (working copy)
@@ -1,4 +1,4 @@
-883bc6ed0ea815293fe6309d66f967ea60630e87
+bb03defe933c89fee44be675d7aa0fbd893ced30
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 228306)
+++ libgo/Makefile.am (working copy)
@@ -233,12 +233,15 @@ toolexeclibgogodir = $(toolexeclibgodir)
toolexeclibgogo_DATA = \
go/ast.gox \
go/build.gox \
+ go/constant.gox \
go/doc.gox \
go/format.gox \
+ go/importer.gox \
go/parser.gox \
go/printer.gox \
go/scanner.gox \
- go/token.gox
+ go/token.gox \
+ go/types.gox
toolexeclibgohashdir = $(toolexeclibgodir)/hash
@@ -292,7 +295,8 @@ toolexeclibgomath_DATA = \
toolexeclibgomimedir = $(toolexeclibgodir)/mime
toolexeclibgomime_DATA = \
- mime/multipart.gox
+ mime/multipart.gox \
+ mime/quotedprintable.gox
toolexeclibgonetdir = $(toolexeclibgodir)/net
@@ -676,46 +680,74 @@ go_math_files = \
go/math/tanh.go \
go/math/unsafe.go
+if LIBGO_IS_OPENBSD
+go_mime_type_file = go/mime/type_openbsd.go
+else
+if LIBGO_IS_FREEBSD
+go_mime_type_file = go/mime/type_freebsd.go
+else
+if LIBGO_IS_DRAGONFLY
+go_mime_type_file = go/mime/type_dragonfly.go
+else
+go_mime_type_file =
+endif
+endif
+endif
+
go_mime_files = \
+ go/mime/encodedword.go \
go/mime/grammar.go \
go/mime/mediatype.go \
go/mime/type.go \
- go/mime/type_unix.go
+ go/mime/type_unix.go \
+ $(go_mime_type_file)
if LIBGO_IS_LINUX
go_net_cgo_file = go/net/cgo_linux.go
go_net_sock_file = go/net/sock_linux.go
go_net_sockopt_file = go/net/sockopt_linux.go
go_net_sockoptip_file = go/net/sockoptip_linux.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_socknew.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
else
if LIBGO_IS_IRIX
go_net_cgo_file = go/net/cgo_linux.go
go_net_sock_file = go/net/sock_linux.go
go_net_sockopt_file = go/net/sockopt_linux.go
go_net_sockoptip_file = go/net/sockoptip_linux.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_socknew.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
else
if LIBGO_IS_SOLARIS
-go_net_cgo_file = go/net/cgo_linux.go
+go_net_cgo_file = go/net/cgo_solaris.go
go_net_sock_file = go/net/sock_stub.go
go_net_sockopt_file = go/net/sockopt_solaris.go
go_net_sockoptip_file = go/net/sockoptip_stub.go
+go_net_cgo_sock_file = go/net/cgo_socknew.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
else
if LIBGO_IS_FREEBSD
go_net_cgo_file = go/net/cgo_bsd.go
go_net_sock_file = go/net/sock_bsd.go
go_net_sockopt_file = go/net/sockopt_bsd.go
go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_sockold.go
+go_net_cgo_res_file = go/net/cgo_resold.go
else
if LIBGO_IS_NETBSD
go_net_cgo_file = go/net/cgo_netbsd.go
go_net_sock_file = go/net/sock_bsd.go
go_net_sockopt_file = go/net/sockopt_bsd.go
go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_sockold.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
else
go_net_cgo_file = go/net/cgo_bsd.go
go_net_sock_file = go/net/sock_bsd.go
go_net_sockopt_file = go/net/sockopt_bsd.go
go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_sockold.go
+go_net_cgo_res_file = go/net/cgo_resold.go
endif
endif
endif
@@ -731,10 +763,14 @@ else
if LIBGO_IS_DRAGONFLY
go_net_sendfile_file = go/net/sendfile_dragonfly.go
else
+if LIBGO_IS_SOLARIS
+go_net_sendfile_file = go/net/sendfile_solaris.go
+else
go_net_sendfile_file = go/net/sendfile_stub.go
endif
endif
endif
+endif
if LIBGO_IS_LINUX
go_net_interface_file = go/net/interface_linux.go
@@ -775,15 +811,22 @@ endif
endif
go_net_common_files = \
+ go/net/addrselect.go \
$(go_net_cloexec_file) \
+ go/net/conf.go \
go/net/dial.go \
go/net/dnsclient.go \
go/net/dnsclient_unix.go \
go/net/dnsconfig_unix.go \
go/net/dnsmsg.go \
go/net/fd_mutex.go \
+ go/net/fd_posix.go \
go/net/fd_unix.go \
+ go/net/file.go \
go/net/file_unix.go \
+ go/net/hook.go \
+ go/net/hook_cloexec.go \
+ go/net/hook_unix.go \
go/net/hosts.go \
go/net/interface.go \
$(go_net_interface_file) \
@@ -796,6 +839,7 @@ go_net_common_files = \
go/net/lookup_unix.go \
go/net/mac.go \
go/net/net.go \
+ go/net/nss.go \
go/net/parse.go \
go/net/pipe.go \
go/net/fd_poll_runtime.go \
@@ -803,7 +847,6 @@ go_net_common_files = \
go/net/port_unix.go \
go/net/race0.go \
$(go_net_sendfile_file) \
- go/net/singleflight.go \
go/net/sock_posix.go \
$(go_net_sock_file) \
go/net/sockopt_posix.go \
@@ -821,6 +864,8 @@ go_net_common_files = \
go_net_files = \
go/net/cgo_unix.go \
$(go_net_cgo_file) \
+ $(go_net_cgo_res_file) \
+ $(go_net_cgo_sock_file) \
$(go_net_common_files)
go_netgo_files = \
@@ -919,6 +964,32 @@ else
go_os_pipe_file = go/os/pipe_bsd.go
endif
+if LIBGO_IS_DARWIN
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+if LIBGO_IS_DRAGONFLY
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+if LIBGO_IS_FREEBSD
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+if LIBGO_IS_NETBSD
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+if LIBGO_IS_OPENBSD
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+if LIBGO_IS_SOLARIS
+go_os_sticky_file = go/os/sticky_bsd.go
+else
+go_os_sticky_file = go/os/sticky_notbsd.go
+endif
+endif
+endif
+endif
+endif
+endif
+
go_os_files = \
$(go_os_dir_file) \
go/os/dir.go \
@@ -939,6 +1010,7 @@ go_os_files = \
$(go_os_pipe_file) \
go/os/proc.go \
$(go_os_stat_file) \
+ $(go_os_sticky_file) \
go/os/str.go \
$(go_os_sys_file) \
$(go_os_cloexec_file) \
@@ -959,6 +1031,7 @@ go_reflect_makefunc_c_file = \
go/reflect/makefunc_ffi_c.c
go_regexp_files = \
+ go/regexp/backtrack.go \
go/regexp/exec.go \
go/regexp/onepass.go \
go/regexp/regexp.go
@@ -974,7 +1047,6 @@ go_runtime_files = \
go/runtime/error.go \
go/runtime/extern.go \
go/runtime/mem.go \
- go/runtime/softfloat64.go \
version.go
version.go: s-version; @true
@@ -1012,6 +1084,7 @@ go_strconv_files = \
go/strconv/atof.go \
go/strconv/atoi.go \
go/strconv/decimal.go \
+ go/strconv/doc.go \
go/strconv/extfloat.go \
go/strconv/ftoa.go \
go/strconv/isprint.go \
@@ -1019,6 +1092,7 @@ go_strconv_files = \
go/strconv/quote.go
go_strings_files = \
+ go/strings/compare.go \
go/strings/reader.go \
go/strings/replace.go \
go/strings/search.go \
@@ -1048,6 +1122,7 @@ endif
endif
go_log_syslog_files = \
+ go/log/syslog/doc.go \
go/log/syslog/syslog.go \
$(go_syslog_file)
go_syslog_c_files = \
@@ -1186,6 +1261,7 @@ crypto_rand_file =
endif
go_crypto_rand_files = \
+ go/crypto/rand/eagain.go \
go/crypto/rand/rand.go \
go/crypto/rand/rand_unix.go \
$(crypto_rand_file) \
@@ -1222,6 +1298,37 @@ go_crypto_tls_files = \
go/crypto/tls/prf.go \
go/crypto/tls/ticket.go \
go/crypto/tls/tls.go
+
+if LIBGO_IS_LINUX
+go_crypto_x509_root_file = go/crypto/x509/root_linux.go
+else
+if LIBGO_IS_SOLARIS
+go_crypto_x509_root_file = go/crypto/x509/root_solaris.go
+else
+if LIBGO_IS_DRAGONFLY
+go_crypto_x509_root_file = go/crypto/x509/root_bsd.go
+else
+if LIBGO_IS_FREEBSD
+go_crypto_x509_root_file = go/crypto/x509/root_bsd.go
+else
+if LIBGO_IS_NETBSD
+go_crypto_x509_root_file = go/crypto/x509/root_bsd.go
+else
+if LIBGO_IS_OPENBSD
+go_crypto_x509_root_file = go/crypto/x509/root_bsd.go
+else
+if LIBGO_IS_DARWIN
+go_crypto_x509_root_file = go/crypto/x509/root_darwin.go
+else
+go_crypto_x509_root_file =
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+
go_crypto_x509_files = \
go/crypto/x509/cert_pool.go \
go/crypto/x509/pem_decrypt.go \
@@ -1229,6 +1336,7 @@ go_crypto_x509_files = \
go/crypto/x509/pkcs8.go \
go/crypto/x509/root.go \
go/crypto/x509/root_unix.go \
+ $(go_crypto_x509_root_file) \
go/crypto/x509/sec1.go \
go/crypto/x509/verify.go \
go/crypto/x509/x509.go
@@ -1246,6 +1354,7 @@ go_database_sql_driver_files = \
go_debug_dwarf_files = \
go/debug/dwarf/buf.go \
+ go/debug/dwarf/class_string.go \
go/debug/dwarf/const.go \
go/debug/dwarf/entry.go \
go/debug/dwarf/line.go \
@@ -1337,6 +1446,9 @@ go_go_build_files = \
go/go/build/doc.go \
go/go/build/read.go \
go/go/build/syslist.go
+go_go_constant_files = \
+ go/go/constant/go14.go \
+ go/go/constant/value.go
go_go_doc_files = \
go/go/doc/comment.go \
go/go/doc/doc.go \
@@ -1347,6 +1459,8 @@ go_go_doc_files = \
go/go/doc/synopsis.go
go_go_format_files = \
go/go/format/format.go
+go_go_importer_files = \
+ go/go/importer/importer.go
go_go_parser_files = \
go/go/parser/interface.go \
go/go/parser/parser.go
@@ -1360,6 +1474,47 @@ go_go_token_files = \
go/go/token/position.go \
go/go/token/serialize.go \
go/go/token/token.go
+go_go_types_files = \
+ go/go/types/api.go \
+ go/go/types/assignments.go \
+ go/go/types/builtins.go \
+ go/go/types/call.go \
+ go/go/types/check.go \
+ go/go/types/conversions.go \
+ go/go/types/decl.go \
+ go/go/types/errors.go \
+ go/go/types/eval.go \
+ go/go/types/expr.go \
+ go/go/types/exprstring.go \
+ go/go/types/go12.go \
+ go/go/types/initorder.go \
+ go/go/types/labels.go \
+ go/go/types/lookup.go \
+ go/go/types/methodset.go \
+ go/go/types/object.go \
+ go/go/types/objset.go \
+ go/go/types/operand.go \
+ go/go/types/ordering.go \
+ go/go/types/package.go \
+ go/go/types/predicates.go \
+ go/go/types/resolver.go \
+ go/go/types/return.go \
+ go/go/types/scope.go \
+ go/go/types/selection.go \
+ go/go/types/stmt.go \
+ go/go/types/sizes.go \
+ go/go/types/type.go \
+ go/go/types/typestring.go \
+ go/go/types/typexpr.go \
+ go/go/types/universe.go
+
+go_go_internal_gcimporter_files = \
+ go/go/internal/gcimporter/exportdata.go \
+ go/go/internal/gcimporter/gcimporter.go
+go_go_internal_gccgoimporter_files = \
+ go/go/internal/gccgoimporter/gccgoinstallation.go \
+ go/go/internal/gccgoimporter/importer.go \
+ go/go/internal/gccgoimporter/parser.go
go_hash_adler32_files = \
go/hash/adler32/adler32.go
@@ -1399,6 +1554,10 @@ go_image_gif_files = \
go/image/gif/reader.go \
go/image/gif/writer.go
+go_image_internal_imageutil_files = \
+ go/image/internal/imageutil/imageutil.go \
+ go/image/internal/imageutil/impl.go
+
go_image_jpeg_files = \
go/image/jpeg/fdct.go \
go/image/jpeg/huffman.go \
@@ -1416,15 +1575,46 @@ go_index_suffixarray_files = \
go/index/suffixarray/qsufsort.go \
go/index/suffixarray/suffixarray.go
+go_internal_format_files = \
+ go/internal/format/format.go
+go_internal_singleflight_files = \
+ go/internal/singleflight/singleflight.go
+
+if LIBGO_IS_LINUX
+internal_syscall_unix_getrandom_file = go/internal/syscall/unix/getrandom_linux.go
+else
+internal_syscall_unix_getrandom_file =
+endif
+
+go_internal_syscall_unix_files = \
+ go/internal/syscall/unix/dummy.go \
+ $(internal_syscall_unix_getrandom_file)
+
+go_internal_testenv_files = \
+ go/internal/testenv/testenv.go
+go_internal_trace_files = \
+ go/internal/trace/goroutines.go \
+ go/internal/trace/parser.go
+
go_io_ioutil_files = \
go/io/ioutil/ioutil.go \
go/io/ioutil/tempfile.go
go_math_big_files = \
+ go/math/big/accuracy_string.go \
go/math/big/arith.go \
+ go/math/big/arith_decl_pure.go \
+ go/math/big/decimal.go \
+ go/math/big/float.go \
+ go/math/big/floatconv.go \
+ go/math/big/ftoa.go \
go/math/big/int.go \
+ go/math/big/intconv.go \
go/math/big/nat.go \
- go/math/big/rat.go
+ go/math/big/natconv.go \
+ go/math/big/rat.go \
+ go/math/big/ratconv.go \
+ go/math/big/roundingmode_string.go
go_math_cmplx_files = \
go/math/cmplx/abs.go \
go/math/cmplx/asin.go \
@@ -1450,9 +1640,12 @@ go_math_rand_files = \
go_mime_multipart_files = \
go/mime/multipart/formdata.go \
go/mime/multipart/multipart.go \
- go/mime/multipart/quotedprintable.go \
go/mime/multipart/writer.go
+go_mime_quotedprintable_files = \
+ go/mime/quotedprintable/reader.go \
+ go/mime/quotedprintable/writer.go
+
go_net_http_files = \
go/net/http/client.go \
go/net/http/cookie.go \
@@ -1504,6 +1697,23 @@ go_net_http_httputil_files = \
go_net_http_internal_files = \
go/net/http/internal/chunked.go
+if LIBGO_IS_LINUX
+go_net_internal_socktest_sys = go/net/internal/socktest/sys_cloexec.go
+else
+if LIBGO_IS_FREEBSD
+go_net_internal_socktest_sys = go/net/internal/socktest/sys_cloexec.go
+else
+go_net_internal_socktest_sys =
+endif
+endif
+
+go_net_internal_socktest_files = \
+ go/net/internal/socktest/switch.go \
+ go/net/internal/socktest/switch_posix.go \
+ go/net/internal/socktest/switch_unix.go \
+ go/net/internal/socktest/sys_unix.go \
+ $(go_net_internal_socktest_sys)
+
go_old_regexp_files = \
go/old/regexp/regexp.go
go_old_template_files = \
@@ -1514,6 +1724,7 @@ go_old_template_files = \
go_os_exec_files = \
go/os/exec/exec.go \
+ go/os/exec/exec_posix.go \
go/os/exec/lp_unix.go
go_os_signal_files = \
@@ -1565,6 +1776,7 @@ go_text_template_files = \
go/text/template/exec.go \
go/text/template/funcs.go \
go/text/template/helper.go \
+ go/text/template/option.go \
go/text/template/template.go
go_text_template_parse_files = \
go/text/template/parse/lex.go \
@@ -1767,6 +1979,12 @@ else
syscall_creds_test_file =
endif
+if LIBGO_IS_LINUX
+syscall_exec_test_file = go/syscall/exec_linux_test.go go/syscall/syscall_linux_test.go
+else
+syscall_exec_test_file =
+endif
+
go_base_syscall_files = \
go/syscall/env_unix.go \
go/syscall/syscall_errno.go \
@@ -1810,21 +2028,14 @@ go_syscall_c_files = \
go_syscall_test_files = \
$(syscall_creds_test_file) \
+ $(syscall_exec_test_file) \
+ go/syscall/exec_unix_test.go \
go/syscall/export_test.go \
+ go/syscall/export_unix_test.go \
go/syscall/mmap_unix_test.go \
go/syscall/syscall_test.go \
go/syscall/syscall_unix_test.go
-if LIBGO_IS_LINUX
-internal_syscall_getrandom_file = go/internal/syscall/getrandom_linux.go
-else
-internal_syscall_getrandom_file =
-endif
-
-go_internal_syscall_files = \
- go/internal/syscall/dummy.go \
- $(internal_syscall_getrandom_file)
-
libcalls.go: s-libcalls; @true
s-libcalls: libcalls-list go/syscall/mksyscall.awk $(go_base_syscall_files)
rm -f libcalls.go.tmp
@@ -1978,12 +2189,17 @@ libgo_go_objs = \
html/template.lo \
go/ast.lo \
go/build.lo \
+ go/constant.lo \
go/doc.lo \
go/format.lo \
+ go/importer.lo \
+ go/internal/gcimporter.lo \
+ go/internal/gccgoimporter.lo \
go/parser.lo \
go/printer.lo \
go/scanner.lo \
go/token.lo \
+ go/types.lo \
hash/adler32.lo \
hash/crc32.lo \
hash/crc64.lo \
@@ -1999,10 +2215,15 @@ libgo_go_objs = \
image/color/palette.lo \
image/draw.lo \
image/gif.lo \
+ image/internal/imageutil.lo \
image/jpeg.lo \
image/png.lo \
index/suffixarray.lo \
- internal/syscall.lo \
+ internal/format.lo \
+ internal/singleflight.lo \
+ internal/syscall/unix.lo \
+ internal/testenv.lo \
+ internal/trace.lo \
io/ioutil.lo \
log/syslog.lo \
log/syslog/syslog_c.lo \
@@ -2010,7 +2231,9 @@ libgo_go_objs = \
math/cmplx.lo \
math/rand.lo \
mime/multipart.lo \
+ mime/quotedprintable.lo \
net/http.lo \
+ net/internal/socktest.lo \
net/mail.lo \
net/rpc.lo \
net/smtp.lo \
@@ -2121,11 +2344,11 @@ CHECK = \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
if test "$(USE_DEJAGNU)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
elif test "$(GOBENCH)" != ""; then \
- $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" --bench="$(GOBENCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" --bench="$(GOBENCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
@@ -2910,6 +3133,15 @@ go/build/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: go/build/check
+@go_include@ go/constant.lo.dep
+go/constant.lo.dep: $(go_go_constant_files)
+ $(BUILDDEPS)
+go/constant.lo: $(go_go_constant_files)
+ $(BUILDPACKAGE)
+go/constant/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: go/constant/check
+
@go_include@ go/doc.lo.dep
go/doc.lo.dep: $(go_go_doc_files)
$(BUILDDEPS)
@@ -2928,6 +3160,15 @@ go/format/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: go/format/check
+@go_include@ go/importer.lo.dep
+go/importer.lo.dep: $(go_go_importer_files)
+ $(BUILDDEPS)
+go/importer.lo: $(go_go_importer_files)
+ $(BUILDPACKAGE)
+go/importer/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: go/importer/check
+
@go_include@ go/parser.lo.dep
go/parser.lo.dep: $(go_go_parser_files)
$(BUILDDEPS)
@@ -2964,6 +3205,33 @@ go/token/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: go/token/check
+@go_include@ go/types.lo.dep
+go/types.lo.dep: $(go_go_types_files)
+ $(BUILDDEPS)
+go/types.lo: $(go_go_types_files)
+ $(BUILDPACKAGE)
+go/types/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: go/types/check
+
+@go_include@ go/internal/gcimporter.lo.dep
+go/internal/gcimporter.lo.dep: $(go_go_internal_gcimporter_files)
+ $(BUILDDEPS)
+go/internal/gcimporter.lo: $(go_go_internal_gcimporter_files)
+ $(BUILDPACKAGE)
+go/internal/gcimporter/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: go/internal/gcimporter/check
+
+@go_include@ go/internal/gccgoimporter.lo.dep
+go/internal/gccgoimporter.lo.dep: $(go_go_internal_gccgoimporter_files)
+ $(BUILDDEPS)
+go/internal/gccgoimporter.lo: $(go_go_internal_gccgoimporter_files)
+ $(BUILDPACKAGE)
+go/internal/gccgoimporter/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: go/internal/gccgoimporter/check
+
@go_include@ hash/adler32.lo.dep
hash/adler32.lo.dep: $(go_hash_adler32_files)
$(BUILDDEPS)
@@ -3036,6 +3304,15 @@ image/gif/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: image/gif/check
+@go_include@ image/internal/imageutil.lo.dep
+image/internal/imageutil.lo.dep: $(go_image_internal_imageutil_files)
+ $(BUILDDEPS)
+image/internal/imageutil.lo: $(go_image_internal_imageutil_files)
+ $(BUILDPACKAGE)
+image/internal/imageutil/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: image/internal/imageutil/check
+
@go_include@ image/jpeg.lo.dep
image/jpeg.lo.dep: $(go_image_jpeg_files)
$(BUILDDEPS)
@@ -3063,6 +3340,51 @@ index/suffixarray/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: index/suffixarray/check
+@go_include@ internal/format.lo.dep
+internal/format.lo.dep: $(go_internal_format_files)
+ $(BUILDDEPS)
+internal/format.lo: $(go_internal_format_files)
+ $(BUILDPACKAGE)
+internal/format/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: internal/format/check
+
+@go_include@ internal/singleflight.lo.dep
+internal/singleflight.lo.dep: $(go_internal_singleflight_files)
+ $(BUILDDEPS)
+internal/singleflight.lo: $(go_internal_singleflight_files)
+ $(BUILDPACKAGE)
+internal/singleflight/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: internal/singleflight/check
+
+@go_include@ internal/syscall/unix.lo.dep
+internal/syscall/unix.lo.dep: $(go_internal_syscall_unix_files)
+ $(BUILDDEPS)
+internal/syscall/unix.lo: $(go_internal_syscall_unix_files)
+ $(BUILDPACKAGE)
+internal/syscall/unix/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: internal/syscall/unix/check
+
+@go_include@ internal/testenv.lo.dep
+internal/testenv.lo.dep: $(go_internal_testenv_files)
+ $(BUILDDEPS)
+internal/testenv.lo: $(go_internal_testenv_files)
+ $(BUILDPACKAGE)
+internal/testenv/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: internal/testenv/check
+
+@go_include@ internal/trace.lo.dep
+internal/trace.lo.dep: $(go_internal_trace_files)
+ $(BUILDDEPS)
+internal/trace.lo: $(go_internal_trace_files)
+ $(BUILDPACKAGE)
+internal/trace/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: internal/trace/check
+
@go_include@ io/ioutil.lo.dep
io/ioutil.lo.dep: $(go_io_ioutil_files)
$(BUILDDEPS)
@@ -3120,6 +3442,15 @@ mime/multipart/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: mime/multipart/check
+@go_include@ mime/quotedprintable.lo.dep
+mime/quotedprintable.lo.dep: $(go_mime_quotedprintable_files)
+ $(BUILDDEPS)
+mime/quotedprintable.lo: $(go_mime_quotedprintable_files)
+ $(BUILDPACKAGE)
+mime/quotedprintable/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: mime/quotedprintable/check
+
@go_include@ net/http.lo.dep
net/http.lo.dep: $(go_net_http_files)
$(BUILDDEPS)
@@ -3237,6 +3568,15 @@ net/http/pprof/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: net/http/pprof/check
+@go_include@ net/internal/socktest.lo.dep
+net/internal/socktest.lo.dep: $(go_net_internal_socktest_files)
+ $(BUILDDEPS)
+net/internal/socktest.lo: $(go_net_internal_socktest_files)
+ $(BUILDPACKAGE)
+net/internal/socktest/check: $(CHECK_DEPS)
+ @$(CHECK)
+.PHONY: net/internal/socktest/check
+
@go_include@ net/rpc/jsonrpc.lo.dep
net/rpc/jsonrpc.lo.dep: $(go_net_rpc_jsonrpc_files)
$(BUILDDEPS)
@@ -3432,15 +3772,6 @@ syscall/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: syscall/check
-@go_include@ internal/syscall.lo.dep
-internal/syscall.lo.dep: $(go_internal_syscall_files)
- $(BUILDDEPS)
-internal/syscall.lo: $(go_internal_syscall_files)
- $(BUILDPACKAGE)
-internal/syscall/check: $(CHECK_DEPS)
- @$(CHECK)
-.PHONY: internal/syscall/check
-
# How to build a .gox file from a .lo file.
BUILDGOX = \
f=`echo $< | sed -e 's/.lo$$/.o/'`; \
@@ -3620,10 +3951,14 @@ go/ast.gox: go/ast.lo
$(BUILDGOX)
go/build.gox: go/build.lo
$(BUILDGOX)
+go/constant.gox: go/constant.lo
+ $(BUILDGOX)
go/doc.gox: go/doc.lo
$(BUILDGOX)
go/format.gox: go/format.lo
$(BUILDGOX)
+go/importer.gox: go/importer.lo
+ $(BUILDGOX)
go/parser.gox: go/parser.lo
$(BUILDGOX)
go/printer.gox: go/printer.lo
@@ -3632,6 +3967,13 @@ go/scanner.gox: go/scanner.lo
$(BUILDGOX)
go/token.gox: go/token.lo
$(BUILDGOX)
+go/types.gox: go/types.lo
+ $(BUILDGOX)
+
+go/internal/gcimporter.gox: go/internal/gcimporter.lo
+ $(BUILDGOX)
+go/internal/gccgoimporter.gox: go/internal/gccgoimporter.lo
+ $(BUILDGOX)
hash/adler32.gox: hash/adler32.lo
$(BUILDGOX)
@@ -3648,6 +3990,8 @@ image/draw.gox: image/draw.lo
$(BUILDGOX)
image/gif.gox: image/gif.lo
$(BUILDGOX)
+image/internal/imageutil.gox: image/internal/imageutil.lo
+ $(BUILDGOX)
image/jpeg.gox: image/jpeg.lo
$(BUILDGOX)
image/png.gox: image/png.lo
@@ -3659,6 +4003,17 @@ image/color/palette.gox: image/color/pal
index/suffixarray.gox: index/suffixarray.lo
$(BUILDGOX)
+internal/format.gox: internal/format.lo
+ $(BUILDGOX)
+internal/singleflight.gox: internal/singleflight.lo
+ $(BUILDGOX)
+internal/syscall/unix.gox: internal/syscall/unix.lo
+ $(BUILDGOX)
+internal/testenv.gox: internal/testenv.lo
+ $(BUILDGOX)
+internal/trace.gox: internal/trace.lo
+ $(BUILDGOX)
+
io/ioutil.gox: io/ioutil.lo
$(BUILDGOX)
@@ -3674,6 +4029,8 @@ math/rand.gox: math/rand.lo
mime/multipart.gox: mime/multipart.lo
$(BUILDGOX)
+mime/quotedprintable.gox: mime/quotedprintable.lo
+ $(BUILDGOX)
net/http.gox: net/http.lo
$(BUILDGOX)
@@ -3704,6 +4061,9 @@ net/http/pprof.gox: net/http/pprof.lo
net/http/internal.gox: net/http/internal.lo
$(BUILDGOX)
+net/internal/socktest.gox: net/internal/socktest.lo
+ $(BUILDGOX)
+
net/rpc/jsonrpc.gox: net/rpc/jsonrpc.lo
$(BUILDGOX)
@@ -3733,9 +4093,6 @@ runtime/pprof.gox: runtime/pprof.lo
sync/atomic.gox: sync/atomic.lo
$(BUILDGOX)
-internal/syscall.gox: internal/syscall.lo
- $(BUILDGOX)
-
text/scanner.gox: text/scanner.lo
$(BUILDGOX)
text/tabwriter.gox: text/tabwriter.lo
@@ -3830,13 +4187,17 @@ TEST_PACKAGES = \
exp/terminal/check \
html/template/check \
go/ast/check \
- $(go_build_check_omitted_since_it_calls_6g) \
+ go/build/check \
+ go/constant/check \
go/doc/check \
go/format/check \
+ go/internal/gcimporter/check \
+ go/internal/gccgoimporter/check \
go/parser/check \
go/printer/check \
go/scanner/check \
go/token/check \
+ go/types/check \
hash/adler32/check \
hash/crc32/check \
hash/crc64/check \
@@ -3846,12 +4207,15 @@ TEST_PACKAGES = \
image/jpeg/check \
image/png/check \
index/suffixarray/check \
+ internal/singleflight/check \
+ internal/trace/check \
io/ioutil/check \
log/syslog/check \
math/big/check \
math/cmplx/check \
math/rand/check \
mime/multipart/check \
+ mime/quotedprintable/check \
net/http/check \
net/http/cgi/check \
net/http/cookiejar/check \
@@ -3859,6 +4223,7 @@ TEST_PACKAGES = \
net/http/httptest/check \
net/http/httputil/check \
net/http/internal/check \
+ net/internal/socktest/check \
net/mail/check \
net/rpc/check \
net/smtp/check \
Index: libgo/VERSION
===================================================================
--- libgo/VERSION (revision 228306)
+++ libgo/VERSION (working copy)
@@ -1 +1 @@
-go1.4.2
\ No newline at end of file
+go1.5
\ No newline at end of file
Index: libgo/merge.sh
===================================================================
--- libgo/merge.sh (revision 228306)
+++ libgo/merge.sh (working copy)
@@ -8,7 +8,7 @@
# into the libgo library. This does the easy stuff; the hard stuff is
# left to the user.
-# The file MERGE should hold the Mercurial revision number of the last
+# The file MERGE should hold the Git revision number of the last
# revision which was merged into these sources. Given that, and given
# the current sources, we can run the usual diff3 algorithm to merge
# all changes into our sources.
@@ -30,7 +30,7 @@ case $# in
1) ;;
2) rev=$2 ;;
*)
- echo 1>&2 "merge.sh: Usage: merge.sh mercurial-repository [revision]"
+ echo 1>&2 "merge.sh: Usage: merge.sh git-repository [revision]"
exit 1
;;
esac
@@ -66,7 +66,7 @@ merge() {
else
echo "merge.sh: ${name}: REMOVED"
rm -f ${libgo}
- hg rm ${libgo}
+ git rm ${libgo}
fi
elif test -f ${old}; then
# The file exists in the old version.
@@ -97,7 +97,6 @@ merge() {
1)
echo "merge.sh: $name: CONFLICTS"
mv ${libgo}.tmp ${libgo}
- hg resolve -u ${libgo}
;;
*)
echo 1>&2 "merge.sh: $name: diff3 failure"
@@ -118,7 +117,7 @@ merge() {
mkdir -p ${dir}
fi
cp ${new} ${libgo}
- hg add ${libgo}
+ git add ${libgo}
fi
fi
}
@@ -174,35 +173,6 @@ done
done
done
-cmdlist="cgo go gofmt"
-for c in $cmdlist; do
- (cd ${NEWDIR}/src/cmd/$c && find . -name '*.go' -print) | while read f; do
- oldfile=${OLDDIR}/src/cmd/$c/$f
- newfile=${NEWDIR}/src/cmd/$c/$f
- libgofile=go/cmd/$c/$f
- merge $f ${oldfile} ${newfile} ${libgofile}
- done
-
- (cd ${NEWDIR}/src/cmd/$c && find . -name testdata -print) | while read d; do
- oldtd=${OLDDIR}/src/cmd/$c/$d
- newtd=${NEWDIR}/src/cmd/$c/$d
- libgotd=go/cmd/$c/$d
- if ! test -d ${oldtd}; then
- continue
- fi
- (cd ${oldtd} && git ls-files .) | while read f; do
- if test "`basename $f`" = ".gitignore"; then
- continue
- fi
- name=$d/$f
- oldfile=${oldtd}/$f
- newfile=${newtd}/$f
- libgofile=${libgotd}/$f
- merge ${name} ${oldfile} ${newfile} ${libgofile}
- done
- done
-done
-
runtime="chan.goc chan.h cpuprof.goc env_posix.c heapdump.c lock_futex.c lfstack.goc lock_sema.c mcache.c mcentral.c mfixalloc.c mgc0.c mgc0.h mheap.c msize.c netpoll.goc netpoll_epoll.c netpoll_kqueue.c netpoll_stub.c panic.c print.c proc.c race.h rdebug.goc runtime.c runtime.h signal_unix.c signal_unix.h malloc.h malloc.goc mprof.goc parfor.c runtime1.goc sema.goc sigqueue.goc string.goc time.goc"
for f in $runtime; do
# merge_c $f $f
@@ -224,7 +194,7 @@ done
fi
echo "merge.sh: ${libgofile}: REMOVED"
rm -f ${libgofile}
- hg rm ${libgofile}
+ git rm ${libgofile}
done
(echo ${new_rev}; sed -ne '2,$p' MERGE) > MERGE.tmp
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh (revision 228306)
+++ libgo/mksysinfo.sh (working copy)
@@ -875,11 +875,13 @@ grep '^type _addrinfo ' gen-sysinfo.go |
-e 's/ ai_/ Ai_/g' \
>> ${OUT}
-# The addrinfo flags and errors.
+# The addrinfo and nameinfo flags and errors.
grep '^const _AI_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(AI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
grep '^const _EAI_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(EAI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+grep '^const _NI_' gen-sysinfo.go | \
+ sed -e 's/^\(const \)_\(NI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
# The passwd struct.
grep '^type _passwd ' gen-sysinfo.go | \
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest (revision 228306)
+++ libgo/testsuite/gotest (working copy)
@@ -26,7 +26,9 @@ NM=${NM:-nm}
# gofiles are the test files. pkgfiles are the source files.
srcdir=.
basedir=.
+goarch=""
gofiles=""
+goos=""
pkgfiles=""
loop=true
keep=false
@@ -58,6 +60,24 @@ while $loop; do
basedir=`echo $1 | sed -e 's/^--basedir=//'`
shift
;;
+ x--goarch)
+ goarch=$2
+ shift
+ shift
+ ;;
+ x--goarch=*)
+ goarch=`echo $1 | sed -e 's/^--goarch=//'`
+ shift
+ ;;
+ x--goos)
+ goos=$2
+ shift
+ shift
+ ;;
+ x--goos=*)
+ goos=`echo $1 | sed -e 's/^--goos=//'`
+ shift
+ ;;
x--pkgpath)
pkgpath=$2
shift
@@ -268,7 +288,96 @@ mkdir _test
case "x$gofiles" in
x)
- gofiles=`ls *_test.go 2>/dev/null`
+ for f in `ls *_test.go`; do
+ tag1=`echo $f | sed -e 's/^.*_\([^_]*\)_test.go$/\1/'`
+ tag2=`echo $f | sed -e 's/^.*_\([^_]*\)_[^_]*_test.go$/\1/'`
+ if test x$tag1 = x$f; then
+ tag1=
+ fi
+ if test x$tag2 = x$f; then
+ tag2=
+ fi
+
+ case "$tag1" in
+ "") ;;
+ $goarch) ;;
+ $goos) ;;
+ android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ tag1=nonmatchingtag
+ ;;
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64)
+ tag1=nonmatchingtag
+ ;;
+ esac
+
+ case "$tag2" in
+ "") ;;
+ $goarch) ;;
+ $goos) ;;
+ android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
+ tag2=nonmatchingtag
+ ;;
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | mipso32 | mipsn32 | mipsn64 | mipso64 | ppc | s390 | s390x | sparc | sparc64)
+ tag2=nonmatchingtag
+ ;;
+ esac
+
+ if test x$tag1 != xnonmatchingtag -a x$tag2 != xnonmatchingtag; then
+ taglines=`sed '/^package /q' < $f | fgrep '// +build '`
+ if test "$taglines" = ""; then
+ omatch=true
+ else
+ omatch=false
+ fi
+ for tags in $taglines; do
+ match=false
+ for tag in $tags; do
+ reverse=false
+ case $tag in
+ "!"*)
+ reverse=true
+ tag=`echo $tag | sed -e 's/^!//'`
+ ;;
+ esac
+
+ case $tag in
+ "//" | "+build")
+ ;;
+ $goos | $goarch | cgo)
+ match=true
+ ;;
+ *,*)
+ match=true
+ for ctag in `echo $tag | sed -e 's/,/ /g'`; do
+ case $ctag in
+ $goos | $goarch | cgo)
+ ;;
+ *)
+ match=false
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ if test "$reverse" = true; then
+ if test "$match" = true; then
+ match=false
+ else
+ match=true
+ fi
+ fi
+ done
+ if test "$match" = "true"; then
+ omatch=true
+ fi
+ done
+
+ if test "$omatch" = "true"; then
+ gofiles="$gofiles $f"
+ fi
+ fi
+ done
;;
*)
xgofiles=$gofiles
Index: libgo/runtime/env_posix.c
===================================================================
--- libgo/runtime/env_posix.c (revision 228306)
+++ libgo/runtime/env_posix.c (working copy)
@@ -11,7 +11,7 @@
extern Slice envs;
-const byte*
+String
runtime_getenv(const char *s)
{
int32 i, j;
@@ -19,6 +19,7 @@ runtime_getenv(const char *s)
const byte *v, *bs;
String* envv;
int32 envc;
+ String ret;
bs = (const byte*)s;
len = runtime_findnull(bs);
@@ -33,8 +34,12 @@ runtime_getenv(const char *s)
goto nomatch;
if(v[len] != '=')
goto nomatch;
- return v+len+1;
+ ret.str = v+len+1;
+ ret.len = envv[i].len-len-1;
+ return ret;
nomatch:;
}
- return nil;
+ ret.str = nil;
+ ret.len = 0;
+ return ret;
}
Index: libgo/runtime/go-varargs.c
===================================================================
--- libgo/runtime/go-varargs.c (revision 228576)
+++ libgo/runtime/go-varargs.c (working copy)
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <sys/types.h>
#include <fcntl.h>
+#include <sys/ioctl.h>
/* The syscall package calls C functions. The Go compiler can not
represent a C varargs functions. On some systems it's important
@@ -56,6 +57,18 @@ __go_fcntl_uintptr (uintptr_t fd, uintpt
return ret;
}
+int
+__go_ioctl (int d, int request, int arg)
+{
+ return ioctl (d, request, arg);
+}
+
+int
+__go_ioctl_ptr (int d, int request, void *arg)
+{
+ return ioctl (d, request, arg);
+}
+
#ifdef HAVE_OPEN64
int
Index: libgo/runtime/malloc.h
===================================================================
--- libgo/runtime/malloc.h (revision 228306)
+++ libgo/runtime/malloc.h (working copy)
@@ -263,7 +263,9 @@ struct MStats
uint64 last_gc; // last GC (in absolute time)
uint64 pause_total_ns;
uint64 pause_ns[256];
+ uint64 pause_end[256];
uint32 numgc;
+ float64 gc_cpu_fraction;
bool enablegc;
bool debuggc;
Index: libgo/runtime/mgc0.c
===================================================================
--- libgo/runtime/mgc0.c (revision 228306)
+++ libgo/runtime/mgc0.c (working copy)
@@ -1368,6 +1368,8 @@ markroot(ParFor *desc, uint32 i)
scanblock(wbuf, false);
}
+static const FuncVal markroot_funcval = { (void *) markroot };
+
// Get an empty work buffer off the work.empty list,
// allocating new buffers as needed.
static Workbuf*
@@ -2102,14 +2104,16 @@ static void mgc(G *gp);
static int32
readgogc(void)
{
+ String s;
const byte *p;
- p = runtime_getenv("GOGC");
- if(p == nil || p[0] == '\0')
+ s = runtime_getenv("GOGC");
+ if(s.len == 0)
return 100;
- if(runtime_strcmp((const char *)p, "off") == 0)
+ p = s.str;
+ if(s.len == 3 && runtime_strcmp((const char *)p, "off") == 0)
return -1;
- return runtime_atoi(p);
+ return runtime_atoi(p, s.len);
}
// force = 1 - do GC regardless of current heap usage
@@ -2252,7 +2256,7 @@ gc(struct gc_args *args)
work.nwait = 0;
work.ndone = 0;
work.nproc = runtime_gcprocs();
- runtime_parforsetup(work.markfor, work.nproc, RootCount + runtime_allglen, nil, false, markroot);
+ runtime_parforsetup(work.markfor, work.nproc, RootCount + runtime_allglen, false, &markroot_funcval);
if(work.nproc > 1) {
runtime_noteclear(&work.alldone);
runtime_helpgc(work.nproc);
@@ -2285,6 +2289,7 @@ gc(struct gc_args *args)
t4 = runtime_nanotime();
mstats.last_gc = runtime_unixnanotime(); // must be Unix time to make sense to user
mstats.pause_ns[mstats.numgc%nelem(mstats.pause_ns)] = t4 - t0;
+ mstats.pause_end[mstats.numgc%nelem(mstats.pause_end)] = mstats.last_gc;
mstats.pause_total_ns += t4 - t0;
mstats.numgc++;
if(mstats.debuggc)
@@ -2749,3 +2754,38 @@ runtime_MHeap_MapBits(MHeap *h)
runtime_SysMap(h->arena_start - n, n - h->bitmap_mapped, h->arena_reserved, &mstats.gc_sys);
h->bitmap_mapped = n;
}
+
+// typedmemmove copies a value of type t to dst from src.
+
+extern void typedmemmove(const Type* td, void *dst, const void *src)
+ __asm__ (GOSYM_PREFIX "reflect.typedmemmove");
+
+void
+typedmemmove(const Type* td, void *dst, const void *src)
+{
+ runtime_memmove(dst, src, td->__size);
+}
+
+// typedslicecopy copies a slice of elemType values from src to dst,
+// returning the number of elements copied.
+
+extern intgo typedslicecopy(const Type* elem, Slice dst, Slice src)
+ __asm__ (GOSYM_PREFIX "reflect.typedslicecopy");
+
+intgo
+typedslicecopy(const Type* elem, Slice dst, Slice src)
+{
+ intgo n;
+ void *dstp;
+ void *srcp;
+
+ n = dst.__count;
+ if (n > src.__count)
+ n = src.__count;
+ if (n == 0)
+ return 0;
+ dstp = dst.__values;
+ srcp = src.__values;
+ memmove(dstp, srcp, (uintptr_t)n * elem->__size);
+ return n;
+}
Index: libgo/runtime/parfor.c
===================================================================
--- libgo/runtime/parfor.c (revision 228306)
+++ libgo/runtime/parfor.c (working copy)
@@ -34,7 +34,7 @@ runtime_parforalloc(uint32 nthrmax)
}
void
-runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void (*body)(ParFor*, uint32))
+runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, bool wait, const FuncVal *body)
{
uint32 i, begin, end;
uint64 *pos;
@@ -49,7 +49,6 @@ runtime_parforsetup(ParFor *desc, uint32
desc->nthr = nthr;
desc->thrseq = 0;
desc->cnt = n;
- desc->ctx = ctx;
desc->wait = wait;
desc->nsteal = 0;
desc->nstealcnt = 0;
@@ -72,7 +71,8 @@ runtime_parfordo(ParFor *desc)
ParForThread *me;
uint32 tid, begin, end, begin2, try, victim, i;
uint64 *mypos, *victimpos, pos, newpos;
- void (*body)(ParFor*, uint32);
+ const FuncVal *body;
+ void (*bodyfn)(ParFor*, uint32);
bool idle;
// Obtain 0-based thread index.
@@ -82,14 +82,16 @@ runtime_parfordo(ParFor *desc)
runtime_throw("parfor: invalid tid");
}
+ body = desc->body;
+ bodyfn = (void (*)(ParFor*, uint32))(void*)body->fn;
+
// If single-threaded, just execute the for serially.
if(desc->nthr==1) {
for(i=0; i<desc->cnt; i++)
- desc->body(desc, i);
+ __builtin_call_with_static_chain (bodyfn(desc, i), body);
return;
}
- body = desc->body;
me = &desc->thr[tid];
mypos = &me->pos;
for(;;) {
@@ -100,7 +102,7 @@ runtime_parfordo(ParFor *desc)
begin = (uint32)pos-1;
end = (uint32)(pos>>32);
if(begin < end) {
- body(desc, begin);
+ __builtin_call_with_static_chain(bodyfn(desc, begin), body);
continue;
}
break;
Index: libgo/runtime/proc.c
===================================================================
--- libgo/runtime/proc.c (revision 229546)
+++ libgo/runtime/proc.c (working copy)
@@ -443,6 +443,7 @@ void
runtime_schedinit(void)
{
int32 n, procs;
+ String s;
const byte *p;
Eface i;
@@ -477,8 +478,9 @@ runtime_schedinit(void)
runtime_sched.lastpoll = runtime_nanotime();
procs = 1;
- p = runtime_getenv("GOMAXPROCS");
- if(p != nil && (n = runtime_atoi(p)) > 0) {
+ s = runtime_getenv("GOMAXPROCS");
+ p = s.str;
+ if(p != nil && (n = runtime_atoi(p, s.len)) > 0) {
if(n > MaxGomaxprocs)
n = MaxGomaxprocs;
procs = n;
@@ -2268,19 +2270,19 @@ runtime_malg(int32 stacksize, byte** ret
// are available sequentially after &fn; they would not be
// copied if a stack split occurred. It's OK for this to call
// functions that split the stack.
-void runtime_testing_entersyscall(void)
+void runtime_testing_entersyscall(int32)
__asm__ (GOSYM_PREFIX "runtime.entersyscall");
void
-runtime_testing_entersyscall()
+runtime_testing_entersyscall(int32 dummy __attribute__ ((unused)))
{
runtime_entersyscall();
}
-void runtime_testing_exitsyscall(void)
+void runtime_testing_exitsyscall(int32)
__asm__ (GOSYM_PREFIX "runtime.exitsyscall");
void
-runtime_testing_exitsyscall()
+runtime_testing_exitsyscall(int32 dummy __attribute__ ((unused)))
{
runtime_exitsyscall();
}
@@ -3429,3 +3431,54 @@ runtime_gcwaiting(void)
{
return runtime_sched.gcwaiting;
}
+
+// os_beforeExit is called from os.Exit(0).
+//go:linkname os_beforeExit os.runtime_beforeExit
+
+extern void os_beforeExit() __asm__ (GOSYM_PREFIX "os.runtime_beforeExit");
+
+void
+os_beforeExit()
+{
+}
+
+// Active spinning for sync.Mutex.
+//go:linkname sync_runtime_canSpin sync.runtime_canSpin
+
+enum
+{
+ ACTIVE_SPIN = 4,
+ ACTIVE_SPIN_CNT = 30,
+};
+
+extern _Bool sync_runtime_canSpin(intgo i)
+ __asm__ (GOSYM_PREFIX "sync.runtime_canSpin");
+
+_Bool
+sync_runtime_canSpin(intgo i)
+{
+ P *p;
+
+ // sync.Mutex is cooperative, so we are conservative with spinning.
+ // Spin only few times and only if running on a multicore machine and
+ // GOMAXPROCS>1 and there is at least one other running P and local runq is empty.
+ // As opposed to runtime mutex we don't do passive spinning here,
+ // because there can be work on global runq on on other Ps.
+ if (i >= ACTIVE_SPIN || runtime_ncpu <= 1 || runtime_gomaxprocs <= (int32)(runtime_sched.npidle+runtime_sched.nmspinning)+1) {
+ return false;
+ }
+ p = m->p;
+ return p != nil && p->runqhead == p->runqtail;
+}
+
+//go:linkname sync_runtime_doSpin sync.runtime_doSpin
+//go:nosplit
+
+extern void sync_runtime_doSpin(void)
+ __asm__ (GOSYM_PREFIX "sync.runtime_doSpin");
+
+void
+sync_runtime_doSpin()
+{
+ runtime_procyield(ACTIVE_SPIN_CNT);
+}
Index: libgo/runtime/runtime.c
===================================================================
--- libgo/runtime/runtime.c (revision 228306)
+++ libgo/runtime/runtime.c (working copy)
@@ -35,6 +35,7 @@ extern volatile intgo runtime_MemProfile
int32
runtime_gotraceback(bool *crash)
{
+ String s;
const byte *p;
uint32 x;
@@ -44,15 +45,14 @@ runtime_gotraceback(bool *crash)
return runtime_m()->traceback;
x = runtime_atomicload(&traceback_cache);
if(x == ~(uint32)0) {
- p = runtime_getenv("GOTRACEBACK");
- if(p == nil)
- p = (const byte*)"";
- if(p[0] == '\0')
+ s = runtime_getenv("GOTRACEBACK");
+ p = s.str;
+ if(s.len == 0)
x = 1<<1;
- else if(runtime_strcmp((const char *)p, "crash") == 0)
+ else if(s.len == 5 && runtime_strcmp((const char *)p, "crash") == 0)
x = (2<<1) | 1;
else
- x = runtime_atoi(p)<<1;
+ x = runtime_atoi(p, s.len)<<1;
runtime_atomicstore(&traceback_cache, x);
}
if(crash != nil)
@@ -136,13 +136,15 @@ os_runtime_args()
}
int32
-runtime_atoi(const byte *p)
+runtime_atoi(const byte *p, intgo len)
{
int32 n;
n = 0;
- while('0' <= *p && *p <= '9')
+ while(len > 0 && '0' <= *p && *p <= '9') {
n = n*10 + *p++ - '0';
+ len--;
+ }
return n;
}
@@ -339,7 +341,9 @@ static struct {
void
runtime_parsedebugvars(void)
{
- const byte *p;
+ String s;
+ const byte *p, *pn;
+ intgo len;
intgo i, n;
bool tmp;
@@ -352,24 +356,27 @@ runtime_parsedebugvars(void)
traceback_cache = ~(uint32)0;
runtime_gotraceback(&tmp);
- p = runtime_getenv("GODEBUG");
- if(p == nil)
+ s = runtime_getenv("GODEBUG");
+ if(s.len == 0)
return;
+ p = s.str;
+ len = s.len;
for(;;) {
for(i=0; i<(intgo)nelem(dbgvar); i++) {
n = runtime_findnull((const byte*)dbgvar[i].name);
- if(runtime_mcmp(p, "memprofilerate", n) == 0 && p[n] == '=')
+ if(len > n && runtime_mcmp(p, "memprofilerate", n) == 0 && p[n] == '=')
// Set the MemProfileRate directly since it
// is an int, not int32, and should only lbe
// set here if specified by GODEBUG
- runtime_MemProfileRate = runtime_atoi(p+n+1);
- else if(runtime_mcmp(p, dbgvar[i].name, n) == 0 && p[n] == '=')
- *dbgvar[i].value = runtime_atoi(p+n+1);
+ runtime_MemProfileRate = runtime_atoi(p+n+1, len-(n+1));
+ else if(len > n && runtime_mcmp(p, dbgvar[i].name, n) == 0 && p[n] == '=')
+ *dbgvar[i].value = runtime_atoi(p+n+1, len-(n+1));
}
- p = (const byte *)runtime_strstr((const char *)p, ",");
- if(p == nil)
+ pn = (const byte *)runtime_strstr((const char *)p, ",");
+ if(pn == nil || pn - p >= len)
break;
- p++;
+ len -= (pn - p) - 1;
+ p = pn + 1;
}
}
Index: libgo/runtime/runtime.h
===================================================================
--- libgo/runtime/runtime.h (revision 228306)
+++ libgo/runtime/runtime.h (working copy)
@@ -421,17 +421,15 @@ struct LFNode
// Parallel for descriptor.
struct ParFor
{
- void (*body)(ParFor*, uint32); // executed for each element
+ const FuncVal *body; // executed for each element
uint32 done; // number of idle threads
uint32 nthr; // total number of threads
uint32 nthrmax; // maximum number of threads
uint32 thrseq; // thread id sequencer
uint32 cnt; // iteration space [0, cnt)
- void *ctx; // arbitrary user context
bool wait; // if true, wait while all threads finish processing,
// otherwise parfor may return while other threads are still working
ParForThread *thr; // array of thread descriptors
- uint32 pad; // to align ParForThread.pos for 64-bit atomic operations
// stats
uint64 nsteal;
uint64 nstealcnt;
@@ -544,6 +542,7 @@ void runtime_schedinit(void);
void runtime_initsig(void);
void runtime_sigenable(uint32 sig);
void runtime_sigdisable(uint32 sig);
+void runtime_sigignore(uint32 sig);
int32 runtime_gotraceback(bool *crash);
void runtime_goroutineheader(G*);
void runtime_printtrace(Location*, int32, bool);
@@ -552,8 +551,8 @@ void runtime_printtrace(Location*, int32
#define runtime_write(d, v, n) write((d), (v), (n))
#define runtime_close(d) close(d)
void runtime_ready(G*);
-const byte* runtime_getenv(const char*);
-int32 runtime_atoi(const byte*);
+String runtime_getenv(const char*);
+int32 runtime_atoi(const byte*, intgo);
void* runtime_mstart(void*);
G* runtime_malg(int32, byte**, size_t*);
void runtime_mpreinit(M*);
@@ -713,12 +712,11 @@ LFNode* runtime_lfstackpop(uint64 *head)
* Parallel for over [0, n).
* body() is executed for each iteration.
* nthr - total number of worker threads.
- * ctx - arbitrary user context.
* if wait=true, threads return from parfor() when all work is done;
* otherwise, threads can return while other threads are still finishing processing.
*/
ParFor* runtime_parforalloc(uint32 nthrmax);
-void runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void (*body)(ParFor*, uint32));
+void runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, bool wait, const FuncVal *body);
void runtime_parfordo(ParFor *desc);
void runtime_parforiters(ParFor*, uintptr, uintptr*, uintptr*);
Index: libgo/runtime/runtime1.goc
===================================================================
--- libgo/runtime/runtime1.goc (revision 228306)
+++ libgo/runtime/runtime1.goc (working copy)
@@ -27,8 +27,8 @@ func newParFor(nthrmax uint32) (desc *Pa
desc = runtime_parforalloc(nthrmax);
}
-func parForSetup(desc *ParFor, nthr uint32, n uint32, ctx *byte, wait bool, body *byte) {
- runtime_parforsetup(desc, nthr, n, ctx, wait, *(void(**)(ParFor*, uint32))body);
+func parForSetup(desc *ParFor, nthr uint32, n uint32, wait bool, body *byte) {
+ runtime_parforsetup(desc, nthr, n, wait, (const FuncVal*) body);
}
func parForDo(desc *ParFor) {
@@ -52,10 +52,7 @@ func NumGoroutine() (ret int) {
}
func getgoroot() (out String) {
- const byte *p;
-
- p = runtime_getenv("GOROOT");
- out = runtime_gostringnocopy(p);
+ out = runtime_getenv("GOROOT");
}
func runtime_pprof.runtime_cyclesPerSecond() (res int64) {
@@ -87,3 +84,13 @@ func sync_atomic.runtime_procPin() (p in
func sync_atomic.runtime_procUnpin() {
runtime_m()->locks--;
}
+
+extern Slice envs;
+
+func envs() (s Slice) {
+ s = envs;
+}
+
+func setenvs(e Slice) {
+ envs = e;
+}
Index: libgo/runtime/signal_unix.c
===================================================================
--- libgo/runtime/signal_unix.c (revision 228306)
+++ libgo/runtime/signal_unix.c (working copy)
@@ -93,6 +93,29 @@ runtime_sigdisable(uint32 sig)
}
void
+runtime_sigignore(uint32 sig)
+{
+ int32 i;
+ SigTab *t;
+
+ t = nil;
+ for(i = 0; runtime_sigtab[i].sig != -1; i++) {
+ if(runtime_sigtab[i].sig == (int32)sig) {
+ t = &runtime_sigtab[i];
+ break;
+ }
+ }
+
+ if(t == nil)
+ return;
+
+ if((t->flags & SigNotify) != 0) {
+ t->flags &= ~SigHandling;
+ runtime_setsig(i, GO_SIG_IGN, true);
+ }
+}
+
+void
runtime_resetcpuprofiler(int32 hz)
{
struct itimerval it;
Index: libgo/runtime/sigqueue.goc
===================================================================
--- libgo/runtime/sigqueue.goc (revision 228306)
+++ libgo/runtime/sigqueue.goc (working copy)
@@ -156,6 +156,14 @@ func signal_disable(s uint32) {
runtime_sigdisable(s);
}
+// Must only be called from a single goroutine at a time.
+func signal_ignore(s uint32) {
+ if (s >= nelem(sig.wanted)*32)
+ return;
+ sig.wanted[s/32] &= ~(1U<<(s&31));
+ runtime_sigignore(s);
+}
+
// This runs on a foreign stack, without an m or a g. No stack split.
void
runtime_badsignal(int sig)
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-10-31 3:35 libgo patch committed: Update to Go 1.5 release Ian Lance Taylor
@ 2015-11-01 8:40 ` Andreas Schwab
2015-11-01 20:33 ` Ian Lance Taylor
2015-11-01 20:52 ` Ian Lance Taylor
2015-11-06 13:01 ` Rainer Orth
1 sibling, 2 replies; 23+ messages in thread
From: Andreas Schwab @ 2015-11-01 8:40 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
_, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
^
$ grep TIOCSPGRP gen-sysinfo.go
// unknowndefine TIOCSPGRP _IOW('t', 118, int)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-01 8:40 ` Andreas Schwab
@ 2015-11-01 20:33 ` Ian Lance Taylor
2015-11-01 20:52 ` Ian Lance Taylor
1 sibling, 0 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-01 20:33 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gcc-patches, gofrontend-dev
On Sun, Nov 1, 2015 at 1:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
> ^
>
> $ grep TIOCSPGRP gen-sysinfo.go
> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
What system?
Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-01 8:40 ` Andreas Schwab
2015-11-01 20:33 ` Ian Lance Taylor
@ 2015-11-01 20:52 ` Ian Lance Taylor
2015-11-02 9:38 ` Andreas Schwab
1 sibling, 1 reply; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-01 20:52 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
On Sun, Nov 1, 2015 at 1:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
> ^
>
> $ grep TIOCSPGRP gen-sysinfo.go
> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
I have committed this patch which may fix the problem. Let me know if
it still happens for you. Thanks.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1259 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229642)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-65ff1d5fb581717229e5c02796d719671a1e8628
+6b4b969f552b8f9ac87a715d5ad06e52bd031b60
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh (revision 229616)
+++ libgo/mksysinfo.sh (working copy)
@@ -183,6 +183,9 @@ enum {
#ifdef TIOCSCTTY
TIOCSCTTY_val = TIOCSCTTY,
#endif
+#ifdef TIOCSPGRP
+ TIOCSPGRP_val = TIOCSPGRP,
+#endif
#ifdef TIOCGPTN
TIOCGPTN_val = TIOCGPTN,
#endif
@@ -917,6 +920,11 @@ if ! grep '^const TIOCSCTTY' ${OUT} >/de
echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT}
fi
fi
+if ! grep '^const TIOCSPGRP' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCSPGRP_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCSPGRP = _TIOCSPGRP_val' >> ${OUT}
+ fi
+fi
if ! grep '^const TIOCGPTN' ${OUT} >/dev/null 2>&1; then
if grep '^const _TIOCGPTN_val' ${OUT} >/dev/null 2>&1; then
echo 'const TIOCGPTN = _TIOCGPTN_val' >> ${OUT}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-01 20:52 ` Ian Lance Taylor
@ 2015-11-02 9:38 ` Andreas Schwab
2015-11-02 15:40 ` Lynn A. Boger
2015-11-02 19:58 ` Ian Lance Taylor
0 siblings, 2 replies; 23+ messages in thread
From: Andreas Schwab @ 2015-11-02 9:38 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
Ian Lance Taylor <iant@golang.org> writes:
> On Sun, Nov 1, 2015 at 1:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
>> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
>> ^
>>
>> $ grep TIOCSPGRP gen-sysinfo.go
>> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
>
> I have committed this patch which may fix the problem. Let me know if
> it still happens for you. Thanks.
../../../../libgo/go/syscall/exec_linux.go:185:37: error: integer constant overflow
_, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
// unknowndefine TIOCSPGRP _IOW('t', 118, int)
const _TIOCSPGRP_val = 2147775606
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-02 9:38 ` Andreas Schwab
@ 2015-11-02 15:40 ` Lynn A. Boger
2015-11-02 20:23 ` Ian Lance Taylor
2015-11-02 19:58 ` Ian Lance Taylor
1 sibling, 1 reply; 23+ messages in thread
From: Lynn A. Boger @ 2015-11-02 15:40 UTC (permalink / raw)
To: Andreas Schwab, Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
I see this error when building gccgo from trunk on ppc64le and running
the libgo tests:
exec_unix_test.go:174:43: error: reference to undefined identifier
'syscall.TIOCGPGRP'
errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP,
uintptr(unsafe.Pointer(&fpgrp)))
^
FAIL: syscall
make[3]: *** [syscall/check] Error 1
On 11/02/2015 03:37 AM, Andreas Schwab wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> On Sun, Nov 1, 2015 at 1:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
>>> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
>>> ^
>>>
>>> $ grep TIOCSPGRP gen-sysinfo.go
>>> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
>> I have committed this patch which may fix the problem. Let me know if
>> it still happens for you. Thanks.
> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: integer constant overflow
> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
>
> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
> const _TIOCSPGRP_val = 2147775606
>
> Andreas.
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-02 9:38 ` Andreas Schwab
2015-11-02 15:40 ` Lynn A. Boger
@ 2015-11-02 19:58 ` Ian Lance Taylor
1 sibling, 0 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-02 19:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
On Mon, Nov 2, 2015 at 1:37 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> On Sun, Nov 1, 2015 at 1:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: reference to undefined name 'TIOCSPGRP'
>>> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
>>> ^
>>>
>>> $ grep TIOCSPGRP gen-sysinfo.go
>>> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
>>
>> I have committed this patch which may fix the problem. Let me know if
>> it still happens for you. Thanks.
>
> ../../../../libgo/go/syscall/exec_linux.go:185:37: error: integer constant overflow
> _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp))
>
> // unknowndefine TIOCSPGRP _IOW('t', 118, int)
> const _TIOCSPGRP_val = 2147775606
You still didn't say what system you are trying. It makes any fix hard to test.
Still, I committed this patch in the hopes of fixing this problem.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1213 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229645)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-6b4b969f552b8f9ac87a715d5ad06e52bd031b60
+e9550aa81d38ada037f675f50cbc09e6f1c35c12
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/go/syscall/exec_unix.go
===================================================================
--- libgo/go/syscall/exec_unix.go (revision 229616)
+++ libgo/go/syscall/exec_unix.go (working copy)
@@ -41,10 +41,10 @@ import (
//sysnb raw_close(fd int) (err Errno)
//close(fd _C_int) _C_int
-//sysnb raw_ioctl(fd int, cmd int, val int) (rval int, err Errno)
+//sysnb raw_ioctl(fd int, cmd uintptr, val int) (rval int, err Errno)
//__go_ioctl(fd _C_int, cmd _C_int, val _C_int) _C_int
-//sysnb raw_ioctl_ptr(fd int, cmd int, val unsafe.Pointer) (rval int, err Errno)
+//sysnb raw_ioctl_ptr(fd int, cmd uintptr, val unsafe.Pointer) (rval int, err Errno)
//__go_ioctl_ptr(fd _C_int, cmd _C_int, val unsafe.Pointer) _C_int
//sysnb raw_execve(argv0 *byte, argv **byte, envv **byte) (err Errno)
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-02 15:40 ` Lynn A. Boger
@ 2015-11-02 20:23 ` Ian Lance Taylor
2015-11-02 20:59 ` Lynn A. Boger
0 siblings, 1 reply; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-02 20:23 UTC (permalink / raw)
To: Lynn A. Boger; +Cc: Andreas Schwab, gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Mon, Nov 2, 2015 at 7:39 AM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> I see this error when building gccgo from trunk on ppc64le and running the
> libgo tests:
>
> exec_unix_test.go:174:43: error: reference to undefined identifier
> 'syscall.TIOCGPGRP'
> errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP,
> uintptr(unsafe.Pointer(&fpgrp)))
> ^
> FAIL: syscall
> make[3]: *** [syscall/check] Error 1
I have committed this patch which I hope will fix this problem.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1266 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229674)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-e9550aa81d38ada037f675f50cbc09e6f1c35c12
+3b06572039eb525abfecce15f066ad6ab0fdea05
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh (revision 229645)
+++ libgo/mksysinfo.sh (working copy)
@@ -183,6 +183,9 @@ enum {
#ifdef TIOCSCTTY
TIOCSCTTY_val = TIOCSCTTY,
#endif
+#ifdef TIOCGPGRP
+ TIOCGPGRP_val = TIOCGPGRP,
+#endif
#ifdef TIOCSPGRP
TIOCSPGRP_val = TIOCSPGRP,
#endif
@@ -920,6 +923,11 @@ if ! grep '^const TIOCSCTTY' ${OUT} >/de
echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT}
fi
fi
+if ! grep '^const TIOCGPGRP' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCGPGRP_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCGPGRP = _TIOCGPGRP_val' >> ${OUT}
+ fi
+fi
if ! grep '^const TIOCSPGRP' ${OUT} >/dev/null 2>&1; then
if grep '^const _TIOCSPGRP_val' ${OUT} >/dev/null 2>&1; then
echo 'const TIOCSPGRP = _TIOCSPGRP_val' >> ${OUT}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-02 20:23 ` Ian Lance Taylor
@ 2015-11-02 20:59 ` Lynn A. Boger
2015-11-02 23:30 ` [gofrontend-dev] " Ian Lance Taylor
0 siblings, 1 reply; 23+ messages in thread
From: Lynn A. Boger @ 2015-11-02 20:59 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Andreas Schwab, gcc-patches, gofrontend-dev
I'll try it.... That was the only error I hit with the go and libgo
tests with Go 1.5.
I assume there will be a different number for the libgo.so for Go 1.5?
On 11/02/2015 02:23 PM, Ian Lance Taylor wrote:
> On Mon, Nov 2, 2015 at 7:39 AM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> I see this error when building gccgo from trunk on ppc64le and running the
>> libgo tests:
>>
>> exec_unix_test.go:174:43: error: reference to undefined identifier
>> 'syscall.TIOCGPGRP'
>> errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP,
>> uintptr(unsafe.Pointer(&fpgrp)))
>> ^
>> FAIL: syscall
>> make[3]: *** [syscall/check] Error 1
> I have committed this patch which I hope will fix this problem.
>
> Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [gofrontend-dev] Re: libgo patch committed: Update to Go 1.5 release
2015-11-02 20:59 ` Lynn A. Boger
@ 2015-11-02 23:30 ` Ian Lance Taylor
0 siblings, 0 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-02 23:30 UTC (permalink / raw)
To: Lynn A. Boger; +Cc: Andreas Schwab, gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
On Mon, Nov 2, 2015 at 12:59 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
>
> I assume there will be a different number for the libgo.so for Go 1.5?
Thanks for the reminder. I committed this patch to bump the version number.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 799 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229676)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-3b06572039eb525abfecce15f066ad6ab0fdea05
+28fbc7f42702ce081ef5f3ce9a1dbc1ed3f3c89e
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac (revision 228306)
+++ libgo/configure.ac (working copy)
@@ -11,7 +11,7 @@ AC_INIT(package-unused, version-unused,,
AC_CONFIG_SRCDIR(Makefile.am)
AC_CONFIG_HEADER(config.h)
-libtool_VERSION=7:0:0
+libtool_VERSION=8:0:0
AC_SUBST(libtool_VERSION)
AM_ENABLE_MULTILIB(, ..)
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-10-31 3:35 libgo patch committed: Update to Go 1.5 release Ian Lance Taylor
2015-11-01 8:40 ` Andreas Schwab
@ 2015-11-06 13:01 ` Rainer Orth
2015-11-06 19:16 ` Ian Lance Taylor
1 sibling, 1 reply; 23+ messages in thread
From: Rainer Orth @ 2015-11-06 13:01 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Ian Lance Taylor <iant@golang.org> writes:
> I have committed a patch to libgo to update it to the Go 1.5 release.
>
> As usual for libgo updates, the actual patch is too large to attach to
> this e-mail message. I've attached the changes to the gccgo-specific
> files.
>
> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
> to mainline.
>
> This may cause trouble on non-GNU/Linux operating systems. Please let
> me know about any problems you encounter.
It does indeed (first tried on i386-pc-solaris2.10):
*
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function '__go_ioctl':
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:63:10: error: implicit declaration of function 'ioctl' [-Werror=implicit-function-declaration]
return ioctl (d, request, arg);
^
Needs <unistd.h>, the following patch works:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gov.patch --]
[-- Type: text/x-patch, Size: 381 bytes --]
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
--- a/libgo/runtime/go-varargs.c
+++ b/libgo/runtime/go-varargs.c
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <unistd.h>
/* The syscall package calls C functions. The Go compiler can not
represent a C varargs functions. On some systems it's important
[-- Attachment #3: Type: text/plain, Size: 1518 bytes --]
*
/vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_bsd.go:107:7: error: incompatible types in assignment (cannot use type int as type Pid_t)
r1 = raw_getpid()
^
I can cast to Pid_t and this works. The underlying error to me seems
that raw_getpid the in the generated libcalls.go is wrong, casting
c_getpid return value to int while pid_t can be long.
*
/vol/gcc/src/hg/trunk/local/libgo/go/net/hook_cloexec.go:13:70: error: reference to undefined identifier 'syscall.Accept4'
accept4Func func(int, int) (int, syscall.Sockaddr, error) = syscall.Accept4
^
No accept4 on Solaris (and certainly other systems, thence configure
test), but used unconditionally.
*
/vol/gcc/src/hg/trunk/local/libgo/go/net/sendfile_solaris.go:78:22: error: reference to undefined identifier 'syscall.Sendfile'
n, err1 := syscall.Sendfile(dst, src, &pos1, n)
^
Only in go/syscall/libcall_linux.go!?
*
/vol/gcc/src/hg/trunk/local/libgo/go/net/tcpsockopt_solaris.go:34:103: error: reference to undefined identifier 'syscall.TCP_KEEPALIVE_THRESHOLD'
return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
^
Not in Solaris 10, only Solaris 11 and 12 have it.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-06 13:01 ` Rainer Orth
@ 2015-11-06 19:16 ` Ian Lance Taylor
2015-11-08 17:21 ` Rainer Orth
0 siblings, 1 reply; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-06 19:16 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]
On Fri, Nov 6, 2015 at 5:01 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> I have committed a patch to libgo to update it to the Go 1.5 release.
>>
>> As usual for libgo updates, the actual patch is too large to attach to
>> this e-mail message. I've attached the changes to the gccgo-specific
>> files.
>>
>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
>> to mainline.
>>
>> This may cause trouble on non-GNU/Linux operating systems. Please let
>> me know about any problems you encounter.
>
> It does indeed (first tried on i386-pc-solaris2.10):
>
> *
>
> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function '__go_ioctl':
> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:63:10: error: implicit declaration of function 'ioctl' [-Werror=implicit-function-declaration]
> return ioctl (d, request, arg);
> ^
>
> Needs <unistd.h>, the following patch works:
>
>
>
> *
>
> /vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_bsd.go:107:7: error: incompatible types in assignment (cannot use type int as type Pid_t)
> r1 = raw_getpid()
> ^
>
> I can cast to Pid_t and this works. The underlying error to me seems
> that raw_getpid the in the generated libcalls.go is wrong, casting
> c_getpid return value to int while pid_t can be long.
>
> *
>
> /vol/gcc/src/hg/trunk/local/libgo/go/net/hook_cloexec.go:13:70: error: reference to undefined identifier 'syscall.Accept4'
> accept4Func func(int, int) (int, syscall.Sockaddr, error) = syscall.Accept4
> ^
>
> No accept4 on Solaris (and certainly other systems, thence configure
> test), but used unconditionally.
>
> *
>
> /vol/gcc/src/hg/trunk/local/libgo/go/net/sendfile_solaris.go:78:22: error: reference to undefined identifier 'syscall.Sendfile'
> n, err1 := syscall.Sendfile(dst, src, &pos1, n)
> ^
>
> Only in go/syscall/libcall_linux.go!?
>
> *
>
> /vol/gcc/src/hg/trunk/local/libgo/go/net/tcpsockopt_solaris.go:34:103: error: reference to undefined identifier 'syscall.TCP_KEEPALIVE_THRESHOLD'
> return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
>
> ^
>
> Not in Solaris 10, only Solaris 11 and 12 have it.
Thanks for the notes. I committed this patch to address these problems.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 7513 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229832)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-47f256e1ed527b2eb4041acf90d33e6abc5e1685
+10c1d6756ed1dcc814c49921c2a5e27f4677e0e6
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am (revision 229832)
+++ libgo/Makefile.am (working copy)
@@ -787,10 +787,14 @@ endif
endif
if LIBGO_IS_LINUX
-go_net_cloexec_file = go/net/sock_cloexec.go
+go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
+else
+if LIBGO_IS_FREEBSD
+go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
else
go_net_cloexec_file = go/net/sys_cloexec.go
endif
+endif
if LIBGO_IS_OPENBSD
go_net_tcpsockopt_file = go/net/tcpsockopt_openbsd.go
@@ -825,7 +829,6 @@ go_net_common_files = \
go/net/file.go \
go/net/file_unix.go \
go/net/hook.go \
- go/net/hook_cloexec.go \
go/net/hook_unix.go \
go/net/hosts.go \
go/net/interface.go \
@@ -1985,6 +1988,12 @@ else
syscall_exec_test_file =
endif
+if LIBGO_IS_LINUX
+syscall_os_file =
+else
+syscall_os_file = go/syscall/libcall_bsd.go
+endif
+
go_base_syscall_files = \
go/syscall/env_unix.go \
go/syscall/syscall_errno.go \
@@ -2003,6 +2012,7 @@ go_base_syscall_files = \
$(syscall_sleep_file) \
$(syscall_errstr_file) \
$(syscall_size_file) \
+ $(syscall_os_file) \
$(syscall_socket_file) \
$(syscall_socket_os_file) \
$(syscall_socket_type_file) \
Index: libgo/go/net/tcpsockopt_solaris.go
===================================================================
--- libgo/go/net/tcpsockopt_solaris.go (revision 229832)
+++ libgo/go/net/tcpsockopt_solaris.go (working copy)
@@ -1,7 +1,9 @@
-// Copyright 2015 The Go Authors. All rights reserved.
+// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// TCP socket options for solaris
+
package net
import (
@@ -10,26 +12,16 @@ import (
"time"
)
+// Set keep alive period.
func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
if err := fd.incref(); err != nil {
return err
}
defer fd.decref()
- // The kernel expects milliseconds so round to next highest
- // millisecond.
- d += (time.Millisecond - time.Nanosecond)
- msecs := int(d / time.Millisecond)
-
- // Normally we'd do
- // syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, secs)
- // here, but we can't because Solaris does not have TCP_KEEPINTVL.
- // Solaris has TCP_KEEPALIVE_ABORT_THRESHOLD, but it's not the same
- // thing, it refers to the total time until aborting (not between
- // probes), and it uses an exponential backoff algorithm instead of
- // waiting the same time between probes. We can't hope for the best
- // and do it anyway, like on Darwin, because Solaris might eventually
- // allocate a constant with a different meaning for the value of
- // TCP_KEEPINTVL on illumos.
- return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
+ // The kernel expects seconds so round to next highest second.
+ d += (time.Second - time.Nanosecond)
+ secs := int(d.Seconds())
+
+ return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.SO_KEEPALIVE, secs))
}
Index: libgo/go/syscall/exec_bsd.go
===================================================================
--- libgo/go/syscall/exec_bsd.go (revision 229832)
+++ libgo/go/syscall/exec_bsd.go (working copy)
@@ -102,11 +102,9 @@ func forkAndExecInChild(argv0 *byte, arg
}
if sys.Foreground {
- pgrp := sys.Pgid
+ pgrp := Pid_t(sys.Pgid)
if pgrp == 0 {
- r1 = raw_getpid()
-
- pgrp = int(r1)
+ pgrp = raw_getpid()
}
// Place process group in foreground.
Index: libgo/go/syscall/exec_linux.go
===================================================================
--- libgo/go/syscall/exec_linux.go (revision 229832)
+++ libgo/go/syscall/exec_linux.go (working copy)
@@ -171,14 +171,9 @@ func forkAndExecInChild(argv0 *byte, arg
}
if sys.Foreground {
- pgrp := int32(sys.Pgid)
+ pgrp := Pid_t(sys.Pgid)
if pgrp == 0 {
- r1 = uintptr(raw_getpid())
- if err1 != 0 {
- goto childerror
- }
-
- pgrp = int32(r1)
+ pgrp = raw_getpid()
}
// Place process group in foreground.
@@ -236,7 +231,7 @@ func forkAndExecInChild(argv0 *byte, arg
// using SIGKILL.
r1 := raw_getppid()
if r1 != ppid {
- pid = raw_getpid()
+ pid := raw_getpid()
err1 = raw_kill(pid, sys.Pdeathsig)
if err1 != 0 {
goto childerror
Index: libgo/go/syscall/exec_unix.go
===================================================================
--- libgo/go/syscall/exec_unix.go (revision 229832)
+++ libgo/go/syscall/exec_unix.go (working copy)
@@ -17,10 +17,10 @@ import (
//sysnb raw_fork() (pid Pid_t, err Errno)
//fork() Pid_t
-//sysnb raw_getpid() (pid int)
+//sysnb raw_getpid() (pid Pid_t)
//getpid() Pid_t
-//sysnb raw_getppid() (pid int)
+//sysnb raw_getppid() (pid Pid_t)
//getppid() Pid_t
//sysnb raw_setsid() (err Errno)
@@ -59,7 +59,7 @@ import (
//sysnb raw_dup2(oldfd int, newfd int) (err Errno)
//dup2(oldfd _C_int, newfd _C_int) _C_int
-//sysnb raw_kill(pid int, sig Signal) (err Errno)
+//sysnb raw_kill(pid Pid_t, sig Signal) (err Errno)
//kill(pid Pid_t, sig _C_int) _C_int
//sysnb raw_setgroups(size int, list unsafe.Pointer) (err Errno)
Index: libgo/go/syscall/exec_unix_test.go
===================================================================
--- libgo/go/syscall/exec_unix_test.go (revision 229832)
+++ libgo/go/syscall/exec_unix_test.go (working copy)
@@ -169,7 +169,7 @@ func TestForeground(t *testing.T) {
t.Skipf("Can't test Foreground. Couldn't open /dev/tty: %s", err)
}
- fpgrp := 0
+ fpgrp := syscall.Pid_t(0)
errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP, uintptr(unsafe.Pointer(&fpgrp)))
if errno != 0 {
Index: libgo/go/syscall/libcall_bsd.go
===================================================================
--- libgo/go/syscall/libcall_bsd.go (revision 0)
+++ libgo/go/syscall/libcall_bsd.go (working copy)
@@ -0,0 +1,27 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// BSD library calls.
+
+package syscall
+
+import "unsafe"
+
+//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
+func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ var soff Offset_t
+ var psoff *Offset_t
+ if offset != nil {
+ psoff = &soff
+ }
+ written, err = sendfile(outfd, infd, psoff, count)
+ if offset != nil {
+ *offset = int64(soff)
+ }
+ return
+}
Index: libgo/runtime/go-varargs.c
===================================================================
--- libgo/runtime/go-varargs.c (revision 229832)
+++ libgo/runtime/go-varargs.c (working copy)
@@ -8,6 +8,7 @@
#include <errno.h>
#include <stdint.h>
+#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/ioctl.h>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-06 19:16 ` Ian Lance Taylor
@ 2015-11-08 17:21 ` Rainer Orth
2015-11-10 21:39 ` Ian Lance Taylor
0 siblings, 1 reply; 23+ messages in thread
From: Rainer Orth @ 2015-11-08 17:21 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]
Ian Lance Taylor <iant@golang.org> writes:
> On Fri, Nov 6, 2015 at 5:01 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>> Ian Lance Taylor <iant@golang.org> writes:
>>
>>> I have committed a patch to libgo to update it to the Go 1.5 release.
>>>
>>> As usual for libgo updates, the actual patch is too large to attach to
>>> this e-mail message. I've attached the changes to the gccgo-specific
>>> files.
>>>
>>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
>>> to mainline.
>>>
>>> This may cause trouble on non-GNU/Linux operating systems. Please let
>>> me know about any problems you encounter.
>>
>> It does indeed (first tried on i386-pc-solaris2.10):
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function '__go_ioctl':
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:63:10: error: implicit declaration of function 'ioctl' [-Werror=implicit-function-declaration]
>> return ioctl (d, request, arg);
>> ^
>>
>> Needs <unistd.h>, the following patch works:
>>
>>
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_bsd.go:107:7: error: incompatible types in assignment (cannot use type int as type Pid_t)
>> r1 = raw_getpid()
>> ^
>>
>> I can cast to Pid_t and this works. The underlying error to me seems
>> that raw_getpid the in the generated libcalls.go is wrong, casting
>> c_getpid return value to int while pid_t can be long.
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/hook_cloexec.go:13:70: error: reference to undefined identifier 'syscall.Accept4'
>> accept4Func func(int, int) (int, syscall.Sockaddr, error) = syscall.Accept4
>> ^
>>
>> No accept4 on Solaris (and certainly other systems, thence configure
>> test), but used unconditionally.
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/sendfile_solaris.go:78:22: error: reference to undefined identifier 'syscall.Sendfile'
>> n, err1 := syscall.Sendfile(dst, src, &pos1, n)
>> ^
>>
>> Only in go/syscall/libcall_linux.go!?
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/tcpsockopt_solaris.go:34:103: error: reference to undefined identifier 'syscall.TCP_KEEPALIVE_THRESHOLD'
>> return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
>>
>> ^
>>
>> Not in Solaris 10, only Solaris 11 and 12 have it.
>
> Thanks for the notes. I committed this patch to address these problems.
Worked like a charm, thanks.
There were two remaining problems:
* Before Solaris 12, sendfile only lives in libsendfile. This lead to
link failures in gotools.
* Solaris 12 introduced a couple more types that use _in6_addr_t, which
are filtered out by mksysinfo.sh, leading to compilation failues.
The following patch addresses both issues. Solaris 10 and 11 bootstraps
have completed, a Solaris 12 bootstrap is still running make check.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgo.patch --]
[-- Type: text/x-patch, Size: 1309 bytes --]
diff --git a/libgo/configure.ac b/libgo/configure.ac
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -482,6 +482,9 @@ AC_CACHE_CHECK([for socket libraries], l
[AC_CHECK_LIB(nsl, main,
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
unset ac_cv_func_gethostbyname
+ AC_CHECK_FUNC(sendfile, ,
+ [AC_CHECK_LIB(sendfile, main,
+ [libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"])])
LIBS=$libgo_old_libs
])
NET_LIBS="$libgo_cv_lib_sockets"
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1488,4 +1488,24 @@ grep '^type _zone_net_addr_t ' gen-sysin
sed -e 's/_in6_addr/[16]byte/' \
>> ${OUT}
+# The Solaris 12 _flow_arp_desc_t struct.
+grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _flow_l3_desc_t struct.
+grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mac_ipaddr_t struct.
+grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mactun_info_t struct.
+grep '^type _mactun_info_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
exit $?
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-08 17:21 ` Rainer Orth
@ 2015-11-10 21:39 ` Ian Lance Taylor
2015-11-11 11:48 ` Rainer Orth
0 siblings, 1 reply; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-10 21:39 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, gofrontend-dev
On Sun, Nov 8, 2015 at 9:21 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> There were two remaining problems:
>
> * Before Solaris 12, sendfile only lives in libsendfile. This lead to
> link failures in gotools.
>
> * Solaris 12 introduced a couple more types that use _in6_addr_t, which
> are filtered out by mksysinfo.sh, leading to compilation failues.
>
> The following patch addresses both issues. Solaris 10 and 11 bootstraps
> have completed, a Solaris 12 bootstrap is still running make check.
Thanks. Committed to mainline.
Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-10 21:39 ` Ian Lance Taylor
@ 2015-11-11 11:48 ` Rainer Orth
2015-11-11 13:25 ` Ian Lance Taylor
0 siblings, 1 reply; 23+ messages in thread
From: Rainer Orth @ 2015-11-11 11:48 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev
Ian Lance Taylor <iant@golang.org> writes:
> On Sun, Nov 8, 2015 at 9:21 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>
>> There were two remaining problems:
>>
>> * Before Solaris 12, sendfile only lives in libsendfile. This lead to
>> link failures in gotools.
>>
>> * Solaris 12 introduced a couple more types that use _in6_addr_t, which
>> are filtered out by mksysinfo.sh, leading to compilation failues.
>>
>> The following patch addresses both issues. Solaris 10 and 11 bootstraps
>> have completed, a Solaris 12 bootstrap is still running make check.
>
> Thanks. Committed to mainline.
Great, thanks. The mkssysinfo.sh part is also necessary on the gcc-5
branch. Tested on i386-pc-solaris2.12 and sparc-sun-solaris2.12, ok to
install?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-11 11:48 ` Rainer Orth
@ 2015-11-11 13:25 ` Ian Lance Taylor
0 siblings, 0 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-11 13:25 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, gofrontend-dev
On Wed, Nov 11, 2015 at 3:48 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> On Sun, Nov 8, 2015 at 9:21 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>>
>>> There were two remaining problems:
>>>
>>> * Before Solaris 12, sendfile only lives in libsendfile. This lead to
>>> link failures in gotools.
>>>
>>> * Solaris 12 introduced a couple more types that use _in6_addr_t, which
>>> are filtered out by mksysinfo.sh, leading to compilation failues.
>>>
>>> The following patch addresses both issues. Solaris 10 and 11 bootstraps
>>> have completed, a Solaris 12 bootstrap is still running make check.
>>
>> Thanks. Committed to mainline.
>
> Great, thanks. The mkssysinfo.sh part is also necessary on the gcc-5
> branch. Tested on i386-pc-solaris2.12 and sparc-sun-solaris2.12, ok to
> install?
Sure, go ahead.
Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 20:17 ` Lynn A. Boger
@ 2015-11-04 1:53 ` Ian Lance Taylor
0 siblings, 0 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-04 1:53 UTC (permalink / raw)
To: Lynn A. Boger; +Cc: Uros Bizjak, gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
On Tue, Nov 3, 2015 at 12:17 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
> I can see the problem in gotest. It has to do with the setting of GOARCH.
>
> Previously GOARCH was being set based on the --goarch argument, but now
> goarch is being set. Not sure both GOARCH and goarch are needed?
>
> I've attached a patch I used to get it to work. It worked for ppc64le and
> ppc64
> with 64 and 32 bit.
Thanks. I committed this version of the patch.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 3196 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229711)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-10e0f935ac369f8403c198b05c909e42e565c1e5
+47f256e1ed527b2eb4041acf90d33e6abc5e1685
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am (revision 229616)
+++ libgo/Makefile.am (working copy)
@@ -2344,11 +2344,11 @@ CHECK = \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
if test "$(USE_DEJAGNU)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
elif test "$(GOBENCH)" != ""; then \
- $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" --bench="$(GOBENCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --bench="$(GOBENCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest (revision 229616)
+++ libgo/testsuite/gotest (working copy)
@@ -35,7 +35,6 @@ keep=false
pkgpath=
prefix=
dejagnu=no
-GOARCH=""
timeout=240
testname=""
bench=""
@@ -118,15 +117,6 @@ while $loop; do
dejagnu=`echo $1 | sed -e 's/^--dejagnu=//'`
shift
;;
- x--goarch)
- GOARCH=$2
- shift
- shift
- ;;
- x--goarch=*)
- GOARCH=`echo $1 | sed -e 's/^--goarch=//'`
- shift
- ;;
x--timeout)
timeout=$2
shift
@@ -496,7 +486,7 @@ localname() {
{
text="T"
- case "$GOARCH" in
+ case "$goarch" in
ppc64*) text="[TD]" ;;
esac
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 17:34 ` Ian Lance Taylor
2015-11-03 20:17 ` Lynn A. Boger
@ 2015-11-03 22:14 ` Andreas Schwab
1 sibling, 0 replies; 23+ messages in thread
From: Andreas Schwab @ 2015-11-03 22:14 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Lynn A. Boger, Uros Bizjak, gcc-patches, gofrontend-dev
Ian Lance Taylor <iant@golang.org> writes:
> I don't know that I have access to a big-endian PPC GNU/Linux machine any more.
There's gcc110 on the compile farm.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 17:34 ` Ian Lance Taylor
@ 2015-11-03 20:17 ` Lynn A. Boger
2015-11-04 1:53 ` Ian Lance Taylor
2015-11-03 22:14 ` Andreas Schwab
1 sibling, 1 reply; 23+ messages in thread
From: Lynn A. Boger @ 2015-11-03 20:17 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Uros Bizjak, gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]
I can see the problem in gotest. It has to do with the setting of GOARCH.
Previously GOARCH was being set based on the --goarch argument, but now
goarch is being set. Not sure both GOARCH and goarch are needed?
I've attached a patch I used to get it to work. It worked for ppc64le
and ppc64
with 64 and 32 bit.
On 11/03/2015 11:34 AM, Ian Lance Taylor wrote:
> On Tue, Nov 3, 2015 at 7:48 AM, Lynn A. Boger
> <laboger@linux.vnet.ibm.com> wrote:
>> We are seeing failures on all the libgo tests when gccgo is built with the
>> latest trunk
>> on ppc64 (BE) and when running the testsuite for 64 bit. The failures
>> do not occur if run on ppc64 BE with m32 and do not occur on ppc64le.
>>
>> The messages say this:
>>
>> make[3]: Entering directory
>> `/home/boger/gccgo.work/trunk/bld/powerpc64-linux/libgo'
>> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
>> FAIL: bufio
>> make[3]: *** [bufio/check] Error 1
>> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
>> FAIL: bytes
>> make[3]: *** [bytes/check] Error 1
>> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
>> FAIL: errors
> I don't know that I have access to a big-endian PPC GNU/Linux machine any more.
>
> My first guess would be that somehow this case in libgo/testsuite/gotest
>
> text="T"
> case "$GOARCH" in
> ppc64*) text="[TD]" ;;
> esac
>
> is not triggering. Although it checks for ppc64*, I think it's only
> required on PPC64 ABI v1 (big-endian) and is not required for ABI v2
> (little endian).
>
> You could try changing to GOARCH there to goarch to see if it helps,
> although as far as I can see either should work.
>
> Otherwise, cd to the libgo working directory, run "make bufio/check",
> figure out how it is running gotest, and run "bash -xv
> gotest_invocation" and send it here.
>
> Ian
>
>
[-- Attachment #2: gccgo-gotest1.5-fix.diff --]
[-- Type: text/x-patch, Size: 638 bytes --]
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest (revision 229711)
+++ libgo/testsuite/gotest (working copy)
@@ -35,7 +35,6 @@
pkgpath=
prefix=
dejagnu=no
-GOARCH=""
timeout=240
testname=""
bench=""
@@ -118,15 +117,6 @@
dejagnu=`echo $1 | sed -e 's/^--dejagnu=//'`
shift
;;
- x--goarch)
- GOARCH=$2
- shift
- shift
- ;;
- x--goarch=*)
- GOARCH=`echo $1 | sed -e 's/^--goarch=//'`
- shift
- ;;
x--timeout)
timeout=$2
shift
@@ -496,7 +486,7 @@
{
text="T"
- case "$GOARCH" in
+ case "$goarch" in
ppc64*) text="[TD]" ;;
esac
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 15:48 ` Lynn A. Boger
@ 2015-11-03 17:34 ` Ian Lance Taylor
2015-11-03 20:17 ` Lynn A. Boger
2015-11-03 22:14 ` Andreas Schwab
0 siblings, 2 replies; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-03 17:34 UTC (permalink / raw)
To: Lynn A. Boger; +Cc: Uros Bizjak, gcc-patches, gofrontend-dev
On Tue, Nov 3, 2015 at 7:48 AM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
>
> We are seeing failures on all the libgo tests when gccgo is built with the
> latest trunk
> on ppc64 (BE) and when running the testsuite for 64 bit. The failures
> do not occur if run on ppc64 BE with m32 and do not occur on ppc64le.
>
> The messages say this:
>
> make[3]: Entering directory
> `/home/boger/gccgo.work/trunk/bld/powerpc64-linux/libgo'
> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
> FAIL: bufio
> make[3]: *** [bufio/check] Error 1
> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
> FAIL: bytes
> make[3]: *** [bytes/check] Error 1
> gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
> FAIL: errors
I don't know that I have access to a big-endian PPC GNU/Linux machine any more.
My first guess would be that somehow this case in libgo/testsuite/gotest
text="T"
case "$GOARCH" in
ppc64*) text="[TD]" ;;
esac
is not triggering. Although it checks for ppc64*, I think it's only
required on PPC64 ABI v1 (big-endian) and is not required for ABI v2
(little endian).
You could try changing to GOARCH there to goarch to see if it helps,
although as far as I can see either should work.
Otherwise, cd to the libgo working directory, run "make bufio/check",
figure out how it is running gotest, and run "bash -xv
gotest_invocation" and send it here.
Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 15:07 ` Ian Lance Taylor
@ 2015-11-03 15:48 ` Lynn A. Boger
2015-11-03 17:34 ` Ian Lance Taylor
0 siblings, 1 reply; 23+ messages in thread
From: Lynn A. Boger @ 2015-11-03 15:48 UTC (permalink / raw)
To: Ian Lance Taylor, Uros Bizjak; +Cc: gcc-patches, gofrontend-dev
We are seeing failures on all the libgo tests when gccgo is built with
the latest trunk
on ppc64 (BE) and when running the testsuite for 64 bit. The failures
do not occur if run on ppc64 BE with m32 and do not occur on ppc64le.
The messages say this:
make[3]: Entering directory
`/home/boger/gccgo.work/trunk/bld/powerpc64-linux/libgo'
gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
FAIL: bufio
make[3]: *** [bufio/check] Error 1
gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
FAIL: bytes
make[3]: *** [bytes/check] Error 1
gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o
FAIL: errors
...... same message for all
On 11/03/2015 09:07 AM, Ian Lance Taylor wrote:
> On Mon, Nov 2, 2015 at 11:48 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>>> I have committed a patch to libgo to update it to the Go 1.5 release.
>>>
>>> As usual for libgo updates, the actual patch is too large to attach to
>>> this e-mail message. I've attached the changes to the gccgo-specific
>>> files.
>>>
>>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
>>> to mainline.
>>>
>>> This may cause trouble on non-GNU/Linux operating systems. Please let
>>> me know about any problems you encounter.
>> There is one new testsuite failure on CentOS 5.11 (kernel 2.6.18),
>> where namespaces are not supported:
>>
>> exec_linux_test.go:29:23: error: reference to undefined identifier
>> 'syscall.CLONE_NEWUSER'
>> Cloneflags: syscall.CLONE_NEWUSER,
>> ^
>> FAIL: syscall
>>
>> The test would be skipped, since "/proc/self/ns/user" doesn't exist,
>> however, the test doesn't compile due to missing CLONE_NEWUSER define.
> Thanks. I committed this patch which should fix the problem.
>
> Ian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
2015-11-03 7:48 Uros Bizjak
@ 2015-11-03 15:07 ` Ian Lance Taylor
2015-11-03 15:48 ` Lynn A. Boger
0 siblings, 1 reply; 23+ messages in thread
From: Ian Lance Taylor @ 2015-11-03 15:07 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On Mon, Nov 2, 2015 at 11:48 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
>> I have committed a patch to libgo to update it to the Go 1.5 release.
>>
>> As usual for libgo updates, the actual patch is too large to attach to
>> this e-mail message. I've attached the changes to the gccgo-specific
>> files.
>>
>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
>> to mainline.
>>
>> This may cause trouble on non-GNU/Linux operating systems. Please let
>> me know about any problems you encounter.
>
> There is one new testsuite failure on CentOS 5.11 (kernel 2.6.18),
> where namespaces are not supported:
>
> exec_linux_test.go:29:23: error: reference to undefined identifier
> 'syscall.CLONE_NEWUSER'
> Cloneflags: syscall.CLONE_NEWUSER,
> ^
> FAIL: syscall
>
> The test would be skipped, since "/proc/self/ns/user" doesn't exist,
> however, the test doesn't compile due to missing CLONE_NEWUSER define.
Thanks. I committed this patch which should fix the problem.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1085 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 229686)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-28fbc7f42702ce081ef5f3ce9a1dbc1ed3f3c89e
+10e0f935ac369f8403c198b05c909e42e565c1e5
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh (revision 229676)
+++ libgo/mksysinfo.sh (working copy)
@@ -1444,6 +1444,11 @@ grep '^type _inotify_event ' gen-sysinfo
# The GNU/Linux CLONE flags.
grep '^const _CLONE_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(CLONE_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+# We need some CLONE constants that are not defined in older versions
+# of glibc.
+if ! grep '^const CLONE_NEWUSER ' ${OUT} > /dev/null 2>&1; then
+ echo "const CLONE_NEWUSER = 0x10000000" >> ${OUT}
+fi
# Struct sizes.
set cmsghdr Cmsghdr ip_mreq IPMreq ip_mreqn IPMreqn ipv6_mreq IPv6Mreq \
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: libgo patch committed: Update to Go 1.5 release
@ 2015-11-03 7:48 Uros Bizjak
2015-11-03 15:07 ` Ian Lance Taylor
0 siblings, 1 reply; 23+ messages in thread
From: Uros Bizjak @ 2015-11-03 7:48 UTC (permalink / raw)
To: gcc-patches; +Cc: Ian Taylor, gofrontend-dev
Hello!
> I have committed a patch to libgo to update it to the Go 1.5 release.
>
> As usual for libgo updates, the actual patch is too large to attach to
> this e-mail message. I've attached the changes to the gccgo-specific
> files.
>
> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
> to mainline.
>
> This may cause trouble on non-GNU/Linux operating systems. Please let
> me know about any problems you encounter.
There is one new testsuite failure on CentOS 5.11 (kernel 2.6.18),
where namespaces are not supported:
exec_linux_test.go:29:23: error: reference to undefined identifier
'syscall.CLONE_NEWUSER'
Cloneflags: syscall.CLONE_NEWUSER,
^
FAIL: syscall
The test would be skipped, since "/proc/self/ns/user" doesn't exist,
however, the test doesn't compile due to missing CLONE_NEWUSER define.
Uros.
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2015-11-11 13:25 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-31 3:35 libgo patch committed: Update to Go 1.5 release Ian Lance Taylor
2015-11-01 8:40 ` Andreas Schwab
2015-11-01 20:33 ` Ian Lance Taylor
2015-11-01 20:52 ` Ian Lance Taylor
2015-11-02 9:38 ` Andreas Schwab
2015-11-02 15:40 ` Lynn A. Boger
2015-11-02 20:23 ` Ian Lance Taylor
2015-11-02 20:59 ` Lynn A. Boger
2015-11-02 23:30 ` [gofrontend-dev] " Ian Lance Taylor
2015-11-02 19:58 ` Ian Lance Taylor
2015-11-06 13:01 ` Rainer Orth
2015-11-06 19:16 ` Ian Lance Taylor
2015-11-08 17:21 ` Rainer Orth
2015-11-10 21:39 ` Ian Lance Taylor
2015-11-11 11:48 ` Rainer Orth
2015-11-11 13:25 ` Ian Lance Taylor
2015-11-03 7:48 Uros Bizjak
2015-11-03 15:07 ` Ian Lance Taylor
2015-11-03 15:48 ` Lynn A. Boger
2015-11-03 17:34 ` Ian Lance Taylor
2015-11-03 20:17 ` Lynn A. Boger
2015-11-04 1:53 ` Ian Lance Taylor
2015-11-03 22:14 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).