aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
AgeCommit message (Collapse)Author
2016-11-15Merge branches/gcc-6-branch rev 242371.Yvan Roux
Change-Id: Ia4fb8e9e94629da786722b5e68605dc8bb971741
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-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-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-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-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
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-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 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-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-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-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-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-08-03 syscall: RawSockaddr fix for ppc64, ppc64leian
The struct RawSockaddr contains a field Data which should be uint8 on ppc64 and ppc64le, but is declared as int8 in gccgo. This change adds a two new files which contain the structure declaration for RawSockaddr, one with the correct types for for ppc64 and ppc64le, and the other for non-ppc64 platforms. Fixes golang/go#11469 Reviewed-on: https://go-review.googlesource.com/11946 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226533 138bc75d-0d04-0410-961f-82ee72b054a4
2015-07-13 syscall: remove calls to Entersyscall & Exitsyscall in Getdentsian
The syscall for Getdents in syscall/libcall_linux.go called Entersyscall and Exitsyscall, causing the runtime_sched counts for goroutines to be incorrect. Inconsistent counts caused checkdead in runtime/proc.c to panic. Fixes golang/go#11406 Reviewed-on: https://go-review.googlesource.com/11761 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225745 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-17 PR go/64683ian
runtime/pprof: Assume function with no name is in runtime. GCC PR 65797 causes some of the runtime functions to be compiled with no name in the debug info. This in turn causes the runtime/pprof test to fail as reported in GCC PR 64683. There are no good choices when a function has no name in the debug info, but here we assume that if we see such a function while reading the runtime functions, we assume that it is also a runtime function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222200 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-17 PR go/65755ian
compiler, runtime, reflect: Use reflection string for type comparisons. Change the runtime and reflect libraries to always use only the type reflection string to determine whether two types are equal. It previously used the PkgPath and Name values for a type name, but that required a PkgPath that did not match the gc compiler. Change the compiler to use the same PkgPath value as the gc compiler in all cases. Change the compiler to put the receiver type in the reflection string for a type defined inside a method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222194 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-31go/cmd/go: always link external test packages firstian
When linking complex packages that use both internal and external tests as well as many dependencies it is critical that the link order be external test package, internal test package, everything else. This change is a back (forward?) port of the same change that canonical have been maintaining on their fork of the go tool for gccgo. Now that gccgo uses the go tool from upstream, this patch should be applied both to the gofrontend and golang/go repos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221800 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-26 PR go/65587ian
debug/elf: apply relocations for SHT_RELA/EM_PPC git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221698 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-26libgo: Fix go/runtime test failure on S390.ian
The tests run out of memory on 31-bit S390 systems because it does not have split stacks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221681 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-24 PR go/65417ian
debug/elf: support reading debug info from 32-bit PPC objects This is a backport of http://golang.org/7590 from the master Go library. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221644 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-24 PR go/65462ian
cmd: Fix dependencies for 'go get' with gccgo Problem described in GCC BZ 65462. Generate the list of the standard GO package names based on what was built into libgo in the libgo Makefile. Change the var name from reqPkgSrc to reqStdPkgSrc to clarify it only affects standard GO packages. Skip the attempted loading of a package only if it is a standard GO package and the flag is set indicating its source is not required to be available. This requires a corresponding change to gotools to build and link in the new file containing the list of standard GO package names that was generated by the libgo Makefile. gotools/: PR go/65462 * Makefile.am (go_cmd_go_files): Add $(libgodir)/zstdpkglist.go. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221643 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-12go/build: cgo works on linux/arm64.ian
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221398 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-12 PR go/65404ian
go/build: cgo works on linux/pcc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221396 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-10 PR go/65353.ian
cmd/cgo: Add all gccgo GOARCH values to size maps. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221293 138bc75d-0d04-0410-961f-82ee72b054a4
2015-03-06libgo: Upgrade to Go 1.4.2 release.ian
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221245 138bc75d-0d04-0410-961f-82ee72b054a4
2015-02-06runtime: Add memprofilerate to GODEBUGian
Add memprofilerate as a value recognized in the GODEBUG env var. The value provided is used as the new setting for runtime.MemProfileRate, allowing the user to adjust memory profiling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220470 138bc75d-0d04-0410-961f-82ee72b054a4
2015-02-03go/types: Remove unused testdata files.ian
The go/types package was removed in July 2013, but the testdata files were accidentally left behind. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220378 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-23 PR go/64573ian
syscall: Restore line somehow lost in libgo merge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220068 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-23 PR go/64725ian
runtime: Disable tests that require that a finalizer run. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220067 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-20 PR go/64683ian
runtime/pprof: Let memory profiler test pass if value not collected. Since gccgo's GC is not precise, the transient value may not be collected. Let the regexp match that case as well. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219900 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-19Add attribute unused to dummy arguments in ffi stubrth
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219862 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-19reflect: Fix build for systems that do not define ffi_go_closure.ian
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219831 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-16testing/quick: Revert Alpha specific change.ian
No longer needed now that libffi supports complex types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219777 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-16compiler, reflect, runtime: Use static chain for closures.ian
Change from using __go_set_closure to passing the closure value in the static chain field. Uses new backend support for setting the closure chain in a call from C via __builtin_call_with_static_chain. Uses new support in libffi for Go closures. The old architecture specific support for reflect.MakeFunc is removed, replaced by the libffi support. All work done by Richard Henderson. * go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument. (Gcc_backend::static_chain_variable): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219776 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-16net: Restore earlier Solaris-specific version of setKeepAlivePeriod.ian
The version from the master repository seems to be appropriate for OpenSolaris but not for Solaris itself. Solaris 11.2 proper does not define TCP_KEEPIDLE or TCP_KEEPINTVL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219749 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-15go/build: cgo works on linux/alpha.ian
From Uros Bizjak. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219691 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-15reflect: Correct error in conversion of s390x support to Go 1.4.ian
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219685 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-15Add files somehow left out of last commit (upgrade to Go 1.4).ian
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219628 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-15libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.ian
This upgrades all of libgo other than the runtime package to the Go 1.4 release. In Go 1.4 much of the runtime was rewritten into Go. Merging that code will take more time and will not change the API, so I'm putting it off for now. There are a few runtime changes anyhow, to accomodate other packages that rely on minor modifications to the runtime support. The compiler changes slightly to add a one-bit flag to each type descriptor kind that is stored directly in an interface, which for gccgo is currently only pointer types. Another one-bit flag (gcprog) is reserved because it is used by the gc compiler, but gccgo does not currently use it. There is another error check in the compiler since I ran across it during testing. gotools/: * Makefile.am (go_cmd_go_files): Sort entries. Add generate.go. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219627 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-10cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" ↵ian
toolchain). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219419 138bc75d-0d04-0410-961f-82ee72b054a4