aboutsummaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)Author
2016-08-22Merge branches/gcc-6-branch rev 239654.Yvan Roux
Change-Id: I21e71f9dc10e3bedc0760cd5cc6b8d36234e3d41
2016-04-13 libgo: update to Go 1.6.1 releaseian
Reviewed-on: https://go-review.googlesource.com/22007 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234958 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-12 reflect: change Value.Call results to not be addressableian
Leaving them incorrectly marked as addressable broke a use of the text/template package, because state.evalField checks CanAddr and takes the address if it is addressable. Reviewed-on: https://go-review.googlesource.com/21908 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234923 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-02 runtime: Use atomic load for in entersyscall.ian
Reportedly fixes PPC64 deadlock. From a comment by Gabriel Russell. Fixes golang/go#15051. Reviewed-on: https://go-review.googlesource.com/21450 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234694 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-26 PR go/69966ian
syscall: Add new Getsockopt functions. Add GetsockoptICMPv6Filter, GetsockoptIPv6MTUInfo, GetsockoptUcred as appropriate. These functions exist in the master library. For GCC PR 69966. Reviewed-on: https://go-review.googlesource.com/19960 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233747 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-24 runtime: lock M during cgo callian
cgo should lock the M. See also https://golang.org/cl/18882 . Reviewed-on: https://go-review.googlesource.com/18883 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233670 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-18 libgo: Update to final Go 1.6 release.ian
Reviewed-on: https://go-review.googlesource.com/19592 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233515 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-12 runtime: For c-archive/c-shared, install signal handlers synchronously.ian
This is a port of https://golang.org/cl/18150 to the gccgo runtime. The previous behaviour of installing the signal handlers in a separate thread meant that Go initialization raced with non-Go initialization if the non-Go initialization also wanted to install signal handlers. Make installing signal handlers synchronous so that the process-wide behavior is predictable. Reviewed-on: https://go-review.googlesource.com/19494 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233393 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-10 PR go/66904ian
cmd/go: fix "#cgo pkg-config:" comments with gccgo Copy of https://golang.org/cl/18790 by Michael Hudson-Doyle. The unique difficulty of #cgo pkg-config is that the linker flags are recorded when the package is compiled but (obviously) must be used when the package is linked into an executable -- so the flags need to be stored on disk somewhere. As it happens cgo already writes out a _cgo_flags file: nothing uses it currently, but this change adds it to the lib$pkg.a file when compiling a package, reads it out when linking (and passes a version of the .a file with _cgo_flags stripped out of it to the linker). It's all fairly ugly but it works and I can't really think of any way of reducing the essential level of ugliness. Update golang/go#11739. GCC PR 66904. Reviewed-on: https://go-review.googlesource.com/19431 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233290 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-10 PR go/69511ian
runtime: change G gcstack_size field to size_t Because its address is passed to __splitstack_find, which expects size_t*. From Dominik Vogt in GCC PR 69511. Reviewed-on: https://go-review.googlesource.com/19429 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233260 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-09 PR go/69537ian
runtime: Don't refer to _end symbol in shared library. Fixes GCC PR 69357. Reviewed-on: https://go-review.googlesource.com/19362 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233235 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-04 libgo: bump version number for upgrade to 1.6rc1ian
Reviewed-on: https://go-review.googlesource.com/19233 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233156 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-03 libgo: Update to go1.6rc1.ian
Reviewed-on: https://go-review.googlesource.com/19200 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233110 138bc75d-0d04-0410-961f-82ee72b054a4
2016-02-03 compiler, runtime: mark stub methods, ignore them in runtime.Caller.ian
This fixes the long-standing bug in which the testing package misreports the file/line of an error. Reviewed-on: https://go-review.googlesource.com/19179 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233098 138bc75d-0d04-0410-961f-82ee72b054a4
2016-01-11 PR 68980ian
libgo/testsuite: portable ps usage in gotest gotest is using "ps" to list descendant sleep processes in its timeout handling, grepping the command name. We are currently using the "cmd" ps output formatter, which is non-portable. We should use "comm" which is part of the POSIX standard, and outputs only the command name and not the arguments. Fixes https://gcc.gnu.org/PR68980 Reviewed-on: https://go-review.googlesource.com/18426 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232234 138bc75d-0d04-0410-961f-82ee72b054a4
2015-12-18 syscall: Add definition for NLA_HDRLENian
This change updates mksysinfo.sh so it correctly includes the define NLA_HDRLEN in the syscall package. Fixes golang/go/#13629 Reviewed-on: https://go-review.googlesource.com/17893 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231796 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-26 PR go/61303ian
runtime: don't overallocate in select code If we've already allocated an fd_set, don't allocate another one. Also, don't bother to read from rdwake if it wasn't returned in select. Fixes https://gcc.gnu.org/PR61303. Reviewed-on: https://go-review.googlesource.com/17243 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230922 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-23 PR go/68496ian
reflect: Allocate space for FFI functions returning a zero-sized type. The libffi library does not understand zero-sized types. We represent them as a struct with a single field of type void. If such a type is returned from a function, libffi will copy 1 byte of data. Allocate space for that byte, although we won't use it. Fixes https://gcc.gnu.org/PR68496. Reviewed-on: https://go-review.googlesource.com/17175 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230776 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-21 PR go/66378ian
syscall: Fix initial offset value in syscall.Sendfile. Bug reported in https://gcc.gnu.org/PR66378. Reviewed-on: https://go-review.googlesource.com/17159 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230699 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-21 PR go/65785ian
net: don't run multicast listen test on nil interface in short mode This is a backport of https://golang.org/cl/17154. The gccgo bug report https://gcc.gnu.org/PR65785 points out that the multicast listen tests will use the network even with -test.short. Fix test by checking testing.Short with a nil interface. Reviewed-on: https://go-review.googlesource.com/17158 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230695 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-21 PR go/66574ian
runtime: Use clock_gettime to get current time. Fetch the current time in nanoseconds, not microseconds, by using clock_gettime rather than gettimeofday. Update golang/go#11222. Fixes https://gcc.gnu.org/PR66574. Reviewed-on: https://go-review.googlesource.com/17156 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230694 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-20 PR go/68072ian
cmd/cgo: ignore vars with no name or type if they have a AttrSpecification Backport of master CL https://golang.org/cl/17151. Fixes https://gcc.gnu.org/PR/68072. Reviewed-on: https://go-review.googlesource.com/17152 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230685 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-20 cmd: Use correct install tool dir with gccgoian
When using the go command built from gccgo to build and install a go tool, use the value from runtime GCCGOTOOLDIR as the install directory. This also fixes the output from 'go tool' when used with the gccgo-built go command, to only include the go tools and not other binaries found in the same directory. Reviewed-on: https://go-review.googlesource.com/16516 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230677 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-10 libgo: use Solaris sendfile lib, fix Solaris _in6_addr_t fieldsian
Before Solaris 12 the sendfile function is found in -lsendfile, so look for it there. Solaris 12 adds some more types that use _in6_addr_t, that need to be edited in mksysinfo. Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/16779 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230132 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-10 PR go/68255ian
cmd/go: always use --whole-archive for gccgo packages This is a backport of https://golang.org/cl/16775. This is, in effect, what the gc toolchain does. It fixes cases where Go code refers to a C global variable; without this, if the global variable was the only thing visible in the C code, the generated cgo file might not get pulled in from the archive, leaving the Go variable uninitialized. This was reported against gccgo as https://gcc.gnu.org/PR68255 . Reviewed-on: https://go-review.googlesource.com/16778 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230120 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-07 PR go/66138ian
reflect, encoding/json, encoding/xml: fix unexported embedded structs Bring in three changes from the master Go repository. These changes will be in Go 1.6, but they are appropriate for gccgo now because they resolve a long-standing discrepancy between how gc and gccgo handle the PkgPath field for embedded unexported struct fields. The core issue is described at https://golang.org/cl/7247. This has been reported against gccgo as https://gcc.gnu.org/PR66138. The three changes being brought over are: https://golang.org/cl/14010 reflect: adjust access to unexported embedded structs This CL changes reflect to allow access to exported fields and methods in unexported embedded structs for gccgo and after gc has been adjusted to disallow access to embedded unexported structs. Adresses #12367, #7363, #11007, and #7247. https://golang.org/cl/14011 encoding/json: check for exported fields in embedded structs Addresses issue #12367. https://golang.org/cl/14012 encoding/xml: check for exported fields in embedded structs Addresses issue #12367. Reviewed-on: https://go-review.googlesource.com/16723 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229907 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-06 libgo: Solaris portability fixes.ian
Only build net/hook_cloexec.go on GNU/Linux and FreeBSD, because those are the only systems with accept4. Add syscall/libcall_bsd.go to define sendfile for *BSD and Solaris. Revert tcpsockopt_solaris.go back to the earlier version, so that it works on Solaris 10. Always pass the address of a Pid_t value to TIOCGPGRP and TIOCSPGRP. Include <unistd.h> in runtime/go-varargs.c. Reviewed-on: https://go-review.googlesource.com/16719 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229880 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-04 gotest: fix handling of --goarch optionian
I managed to add a new --goarch option to gotest without noticing that the script already had one. Worse, they set different variables. Remove the old option in favor of the new one. Reviewed-on: https://go-review.googlesource.com/16613 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229734 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-03 mksysinfo.sh: Make sure that CLONE_NEWUSER is defined.ian
Reviewed-on: https://go-review.googlesource.com/16588 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229711 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-02 libgo: Bump version number.ian
Reviewed-on: https://go-review.googlesource.com/16583 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229686 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-02 mksysinfo.sh: Handle TIOCGPGRP if too complex for -dump-go-spec.ian
Reviewed-on: https://go-review.googlesource.com/16580 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229676 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-02 syscall: Change raw_ioctl cmd type to uintptr.ian
Attempt to fix a build bug report: ../../../../libgo/go/syscall/exec_linux.go:185:37: error: integer constant overflow _, err1 = raw_ioctl_ptr(sys.Ctty, TIOCSPGRP, unsafe.Pointer(&pgrp)) Reviewed-on: https://go-review.googlesource.com/16539 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229674 138bc75d-0d04-0410-961f-82ee72b054a4
2015-11-01 mksysinfo.sh: Handle TIOCSPGRP if too complex for -fdump-go-spec.ian
Reviewed-on: https://go-review.googlesource.com/16534 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229645 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-31 runtime: If no split stacks, allocate stacks using mmap on 64-bit systems.ian
When not using split stacks, libgo allocate large stacks for each goroutine. On a 64-bit system, libgo allocates a maximum of 128G for the Go heap, and allocates 4M for each stack. When the stacks are allocated from the Go heap, the result is that a program can only create 32K goroutines, which is not enough for an active Go server. This patch changes libgo to allocate the stacks using mmap directly, rather than allocating them out of the Go heap. This change is only done for 64-bit systems when not using split stacks. When using split stacks, the stacks are allocated using mmap directly anyhow. On a 32-bit system, there is no maximum size for the Go heap, or, rather, the maximum size is the available address space anyhow. Reviewed-on: https://go-review.googlesource.com/16531 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229636 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-31 libgo: Update from Go 1.5 to Go 1.5.1.ian
Reviewed-on: https://go-review.googlesource.com/16527 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229624 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-31 runtime: Remove now unnecessary pad field from ParFor.ian
It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229616 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-29 compiler, reflect, runtime: remove zero field from type descriptorian
Type descriptors picked up a zero field because the gc map implementation used it. However, it's since been dropped by the gc library. It was never used by gccgo. Drop it now in preparation for upgrading to the Go 1.5 library. Reviewed-on: https://go-review.googlesource.com/16486 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229546 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-29 compiler, runtime: change type hash/equal to Go funcsian
Change the type descriptor hash and equal functions from C code pointers to Go func values. This permits them to be set to a Go function closure. This is in preparation for the Go 1.5, so that we can use a closure for the hash/equal functions returned by the new reflect.ArrayOf function. Reviewed-on: https://go-review.googlesource.com/16485 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229541 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-09Testsuite: add dg-{begin|end}-multiline-output commandsdmalcolm
This patch adds an easy way to write tests for expected multiline output. For example we can test carets and underlines for a particular diagnostic with: /* { dg-begin-multiline-output "" } typedef struct _GMutex GMutex; ^~~~~~~ { dg-end-multiline-output "" } */ multiline.exp is used by prune.exp; hence we need to load it before prune.exp via *load_gcc_lib* for the testsuites of the various non-"gcc" support libraries (e.g. boehm-gc). gcc/testsuite/ChangeLog: * lib/multiline.exp: New file. * lib/prune.exp: Load multiline.exp. (prune_gcc_output): Call into multiline.exp to handle any multiline output directives. * lib/libgo.exp: Load multiline.exp before prune.exp, using load_gcc_lib. boehm-gc/ChangeLog: * testsuite/lib/boehm-gc.exp: Load multiline.exp before prune.exp, using load_gcc_lib. libatomic/ChangeLog: * testsuite/lib/libatomic.exp: Load multiline.exp before prune.exp, using load_gcc_lib. libgomp/ChangeLog: * testsuite/lib/libgomp.exp: Load multiline.exp before prune.exp, using load_gcc_lib. libitm/ChangeLog: * testsuite/lib/libitm.exp: Load multiline.exp before prune.exp, using load_gcc_lib. libvtv/ChangeLog: * testsuite/lib/libvtv.exp: Load multiline.exp before prune.exp, using load_gcc_lib. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228655 138bc75d-0d04-0410-961f-82ee72b054a4
2015-10-07 PR go/67874ian
net, runtime: Call C library fcntl function rather than syscall.Syscall. Not all systems define a fcntl syscall; some only have fcntl64. Fixes GCC PR go/67874. Reviewed-on: https://go-review.googlesource.com/15497 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228576 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-24 runtime: Fix recent lfstack change on Solaris.ian
Reviewed-on: https://go-review.googlesource.com/14922 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228087 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-23 PR go/67695ian
mksysinfo.sh: Use = with test rather than ==. Fixes GCC PR 67695. Reviewed-on: https://go-review.googlesource.com/14858 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228064 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-23 runtime: rewrite lfstack packing/unpacking to look more like that in Goian
Reviewed-on: https://go-review.googlesource.com/13037 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228057 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-15 libgo: If compiler can split-stack and linker can not, use -fno-split-stack.ian
If the compiler supports split-stack but we are using a gold linker that does not, as happens on PPC with current GCC but old gold, then we need to compile the Go code with -fno-split-stack to avoid a linker error avoid the inability to call from split-stack code to non-split-stack code. Reviewed-on: https://go-review.googlesource.com/14598 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227811 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-15 libgo: test linking split-stack and non-split-stack togetherian
PPC has split-stack support in current GCC, but old version of gold will reject attempts to link PPC split-stack and non-split-stack code together. Test for that, and don't compile the C code with -fsplit-stack if it doesn't work. Reviewed-on: https://go-review.googlesource.com/14594 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227802 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-15 runtime: Ignore stack sizes when deciding when to GC.ian
This restores https://golang.org/cl/6081043 which was lost accidentally when updating a new version of libgo in https://golang.org/cl/22440043 . Reviewed-on: https://go-review.googlesource.com/14569 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227784 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-15 libgo: don't provide ustat on arm64 GNU/Linuxian
This avoids linker warnings when linking against glibc, as apparently arm64 GNU/Linux does not support the ustat system call. Also update to automake 1.11.6, as that is the new GCC standard. Reviewed-on: https://go-review.googlesource.com/14567 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227777 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-11 libgo/runtime: return 0, not NULL, from mainian
Reviewed-on: https://go-review.googlesource.com/13421 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227673 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-10 libgo: Use stat_atim.go on Solaris 12+ian
From Rainer Orth. Solaris 12 changes the stat_[amc]tim members of struct stat from timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo build. The following patch checks for this change and uses the common stat_atim.go if appropriate. Reviewed-on: https://go-review.googlesource.com/14495 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227665 138bc75d-0d04-0410-961f-82ee72b054a4
2015-08-20 libgo/testsuite: another fix for killing the sleep processian
Avoid ps padding issues. Make sure we locate and kill just the sleep process. Reviewed-on: https://go-review.googlesource.com/13634 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227037 138bc75d-0d04-0410-961f-82ee72b054a4