summaryrefslogtreecommitdiff
path: root/libgo/go
Commit message (Collapse)AuthorAgeFilesLines
* libgo: update to go1.7rc3Ian Lance Taylor2016-07-221139-16532/+51083
| | | | | | Reviewed-on: https://go-review.googlesource.com/25150 From-SVN: r238662
* cmd/go: bring in final version of gccgo pkg-config supportIan Lance Taylor2016-04-231-2/+11
| | | | | | | | | | | This updates gccgo to the final version of https://golang.org/cl/18790, by Michael Hudson-Doyle. Update golang/go#11739. Reviewed-on: https://go-review.googlesource.com/22400 From-SVN: r235380
* libgo: update to Go 1.6.1 releaseIan Lance Taylor2016-04-1310-13/+59
| | | | | | Reviewed-on: https://go-review.googlesource.com/22007 From-SVN: r234958
* reflect: change Value.Call results to not be addressableIan Lance Taylor2016-04-122-3/+11
| | | | | | | | | | 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 From-SVN: r234923
* re PR go/69966 (libgo: Port syscall.SetsockoptUcred from golang)Ian Lance Taylor2016-02-263-0/+28
| | | | | | | | | | | | | | PR go/69966 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 From-SVN: r233747
* libgo: Update to final Go 1.6 release.Ian Lance Taylor2016-02-1840-149/+1337
| | | | | | Reviewed-on: https://go-review.googlesource.com/19592 From-SVN: r233515
* re PR go/66904 (cmd/go: "#cgo pkg-config:" comments do not work with gccgo)Ian Lance Taylor2016-02-101-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | PR go/66904 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 From-SVN: r233290
* libgo: Update to go1.6rc1.Ian Lance Taylor2016-02-03715-11668/+43431
| | | | | | Reviewed-on: https://go-review.googlesource.com/19200 From-SVN: r233110
* re PR go/66378 (libgo syscall.Sendfile() does not honor/use offset argument)Ian Lance Taylor2015-11-212-0/+2
| | | | | | | | | | | PR go/66378 syscall: Fix initial offset value in syscall.Sendfile. Bug reported in https://gcc.gnu.org/PR66378. Reviewed-on: https://go-review.googlesource.com/17159 From-SVN: r230699
* re PR go/65785 (libgo TestIPv4MulticastListener test fails on machine with ↵Ian Lance Taylor2015-11-211-2/+2
| | | | | | | | | | | | | | | | | no network connection) PR go/65785 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 From-SVN: r230695
* re PR go/68072 (malformed DWARF TagVariable entry)Ian Lance Taylor2015-11-201-0/+5
| | | | | | | | | | | | | PR go/68072 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 From-SVN: r230685
* cmd: Use correct install tool dir with gccgoIan Lance Taylor2015-11-202-2/+27
| | | | | | | | | | | | | | 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 From-SVN: r230677
* re PR go/68255 (cgo-generated constructor not being called)Ian Lance Taylor2015-11-101-10/+2
| | | | | | | | | | | | | | | | | | | PR go/68255 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 From-SVN: r230120
* re PR go/66138 (json decoder Decode function fails for some structure return ↵Ian Lance Taylor2015-11-077-18/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values) PR go/66138 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 From-SVN: r229907
* libgo: Solaris portability fixes.Ian Lance Taylor2015-11-066-32/+44
| | | | | | | | | | | | | | | | | | 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 From-SVN: r229880
* syscall: Change raw_ioctl cmd type to uintptr.Ian Lance Taylor2015-11-021-2/+2
| | | | | | | | | | | 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 From-SVN: r229674
* libgo: Update from Go 1.5 to Go 1.5.1.Ian Lance Taylor2015-10-3113-14/+87
| | | | | | Reviewed-on: https://go-review.googlesource.com/16527 From-SVN: r229624
* runtime: Remove now unnecessary pad field from ParFor.Ian Lance Taylor2015-10-31988-30033/+85128
| | | | | | | | It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 From-SVN: r229616
* compiler, reflect, runtime: remove zero field from type descriptorIan Lance Taylor2015-10-291-6/+0
| | | | | | | | | | | 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 From-SVN: r229546
* compiler, runtime: change type hash/equal to Go funcsIan Lance Taylor2015-10-291-2/+2
| | | | | | | | | | | | 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 From-SVN: r229541
* re PR go/67874 (fd_unix.go does not build when there is fcntl64 and no fcntl ↵Ian Lance Taylor2015-10-071-1/+9
| | | | | | | | | | | | | | | syscall) PR go/67874 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 From-SVN: r228576
* libgo: don't provide ustat on arm64 GNU/LinuxIan Lance Taylor2015-09-152-3/+11
| | | | | | | | | | | 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 From-SVN: r227777
* syscall: RawSockaddr fix for ppc64, ppc64leIan Lance Taylor2015-08-033-5/+28
| | | | | | | | | | | | | | | 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 From-SVN: r226533
* syscall: remove calls to Entersyscall & Exitsyscall in GetdentsIan Lance Taylor2015-07-131-2/+0
| | | | | | | | | | | | | | 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 From-SVN: r225745
* re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match)Ian Lance Taylor2015-04-171-0/+4
| | | | | | | | | | | | | | | | PR go/64683 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. From-SVN: r222200
* re PR go/65755 (incorrect reflection of struct fields with gccgo)Ian Lance Taylor2015-04-171-7/+1
| | | | | | | | | | | | | | | | | | | PR go/65755 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. From-SVN: r222194
* go/cmd/go: always link external test packages firstIan Lance Taylor2015-03-313-5/+14
| | | | | | | | 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. From-SVN: r221800
* re PR go/65587 (C package incomplete/not working for powerpc-linux-gnu)Ian Lance Taylor2015-03-261-1/+1
| | | | | | | PR go/65587 debug/elf: apply relocations for SHT_RELA/EM_PPC From-SVN: r221698
* libgo: Fix go/runtime test failure on S390.Ian Lance Taylor2015-03-262-1/+11
| | | | | | | The tests run out of memory on 31-bit S390 systems because it does not have split stacks. From-SVN: r221681
* re PR go/65417 (debug/elf: lacks support for PPC relocations)Ian Lance Taylor2015-03-243-0/+49
| | | | | | | | | | PR go/65417 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. From-SVN: r221644
* re PR go/65462 (Use of 'go get' with gccgo is not finding dependencies ↵Ian Lance Taylor2015-03-243-14/+20
| | | | | | | | | | | | | | | | | | | | correctly) PR go/65462 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. From-SVN: r221643
* go/build: cgo works on linux/arm64.Ian Lance Taylor2015-03-121-0/+1
| | | | From-SVN: r221398
* re PR go/65404 (cgo tool on powerpc-linux-gnu maybe incomplete)Ian Lance Taylor2015-03-121-0/+1
| | | | | | | PR go/65404 go/build: cgo works on linux/pcc. From-SVN: r221396
* re PR go/65353 (unknown ptrSize for $GOARCH "arm64" on aarch64-linux-gnu)Ian Lance Taylor2015-03-101-10/+32
| | | | | | | PR go/65353. cmd/cgo: Add all gccgo GOARCH values to size maps. From-SVN: r221293
* libgo: Upgrade to Go 1.4.2 release.Ian Lance Taylor2015-03-0615-53/+157
| | | | From-SVN: r221245
* runtime: Add memprofilerate to GODEBUGIan Lance Taylor2015-02-061-0/+4
| | | | | | | | | | 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. From-SVN: r220470
* go/types: Remove unused testdata files.Ian Lance Taylor2015-02-0313-1992/+0
| | | | | | | The go/types package was removed in July 2013, but the testdata files were accidentally left behind. From-SVN: r220378
* re PR go/64573 (Cmd.Start swallows error from fork()/clone())Ian Lance Taylor2015-01-231-0/+1
| | | | | | | PR go/64573 syscall: Restore line somehow lost in libgo merge. From-SVN: r220068
* re PR go/64725 (FAIL: libgo/runtime TestFinalizerType testing.go:278: #2: ↵Ian Lance Taylor2015-01-231-0/+9
| | | | | | | | | finalizer for type func(*int) didn't run) PR go/64725 runtime: Disable tests that require that a finalizer run. From-SVN: r220067
* re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match)Ian Lance Taylor2015-01-201-2/+4
| | | | | | | | | | PR go/64683 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. From-SVN: r219900
* Add attribute unused to dummy arguments in ffi stubRichard Henderson2015-01-191-1/+2
| | | | From-SVN: r219862
* reflect: Fix build for systems that do not define ffi_go_closure.Ian Lance Taylor2015-01-193-7/+7
| | | | From-SVN: r219831
* testing/quick: Revert Alpha specific change.Ian Lance Taylor2015-01-161-7/+4
| | | | | | No longer needed now that libffi supports complex types. From-SVN: r219777
* compiler, reflect, runtime: Use static chain for closures.Richard Henderson2015-01-1612-2205/+48
| | | | | | | | | | | | | | | | | | 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. From-SVN: r219776
* net: Restore earlier Solaris-specific version of setKeepAlivePeriod.Ian Lance Taylor2015-01-161-0/+27
| | | | | | | | 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. From-SVN: r219749
* go/build: cgo works on linux/alpha.Ian Lance Taylor2015-01-151-0/+1
| | | | | | From Uros Bizjak. From-SVN: r219691
* reflect: Correct error in conversion of s390x support to Go 1.4.Ian Lance Taylor2015-01-151-1/+1
| | | | From-SVN: r219685
* Add files somehow left out of last commit (upgrade to Go 1.4).Ian Lance Taylor2015-01-152-0/+174
| | | | From-SVN: r219628
* libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.Ian Lance Taylor2015-01-15588-6750/+29513
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. From-SVN: r219627
* cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" ↵Ian Lance Taylor2015-01-101-0/+1
| | | | | | toolchain). From-SVN: r219419