summaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)Author
2016-09-20 syscall: build export_unix_test.go on solarisian
Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/29436 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240285 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-20 PR go/77642ian
runtime: pass correct type to __splitstack_find The code was passing uintptr* to a function that expected size_t*. Based on patch by Andreas Krebbel. Fixes GCC PR 77642. Reviewed-on: https://go-review.googlesource.com/29433 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240275 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-14 libgo: fix typo in configure.ac (PCQUANTUm -> PCQUANTUM)ian
Reviewed-on: https://go-review.googlesource.com/29154 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240146 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-11 runtime/internal/sys: new package, API copied from Go 1.7ian
Copy over the Go 1.7 runtime/internal/sys package, but instead of having separate files for each GOARCH and GOOS value, set the values in configure.ac and write them out in Makefile.am. Setting the values in configure.ac should make it easier to add new processors. Remove the automake GOARCH conditionals, which are no longer used. Leave the GOOS conditionals for now, as they are used for the C runtime package. Reviewed-on: https://go-review.googlesource.com/29018 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240083 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-10 libgo: update to Go 1.7.1 releaseian
Reviewed-on: https://go-review.googlesource.com/29012 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240071 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-10 runtime/internal/atomic: new package, API copied from Go 1.7ian
Copy over the Go 1.7 runtime/internal/atomic package, but implement the functions in C using __atomic functions rather than using the processor-specific assembler code. Reviewed-on: https://go-review.googlesource.com/29010 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240070 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-09 runtime: use alignof to check alignment of ucontext_tian
Use alignof rather than assuming a 16 byte alignment. Reviewed-on: https://go-review.googlesource.com/28913 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240047 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-09 runtime: remove remaining use of MAKECONTEXT_STACK_TOP macroian
The definition and most uses of MAKECONTEXT_STACK_TOP were removed in https://golang.org/cl/88660043, which removed support for Solaris 8/9. One use of MAKECONTEXT_STACK_TOP was accidentally left in the source code. Remove it now. Reviewed-on: https://go-review.googlesource.com/28911 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240045 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-09 runtime: align ucontext_t argument to 16 byte boundaryian
Some systems, such as ia64 and PPC, require that a ucontext_t pointer passed to getcontext and friends be aligned to a 16-byte boundary. Currently the ucontext_t fields in the g structure are defined in Go, and Go has no way to ensure a 16-byte alignment for a struct field. The fields are currently represented by an array of unsafe.Pointer. Enforce the alignment by making the array larger, and picking an offset into the array that is 16-byte aligned. Reviewed-on: https://go-review.googlesource.com/28910 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240044 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-31 runtime: make gsignal stack at least SIGSTKSZ bytesian
The default stack size for the gsignal goroutine, 32K, is not enough on ia64. Make sure that the stack size is at least SIGSTKSZ. Reviewed-on: https://go-review.googlesource.com/28224 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239894 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-30 runtime: use -fgo-c-header to build C header fileian
Use the new -fgo-c-header option to build a header file for the Go runtime code in libgo/go/runtime, and use the new header file in the C runtime code in libgo/runtime. This will ensure that the Go code and C code share the same data structures as we convert the runtime from C to Go. The new file libgo/go/runtime/runtime2.go is copied from the Go 1.7 release, and then edited to remove unnecessary data structures and modify others for use with libgo. The new file libgo/go/runtime/mcache.go is an initial version of the same files in the Go 1.7 release, and will be replaced by the Go 1.7 file when we convert to the new memory allocator. The new file libgo/go/runtime/type.go describes the gccgo version of the reflection data structures, and replaces the Go 1.7 runtime file which describes the gc version of those structures. Using the new header file means changing a number of struct fields to use Go naming conventions (that is, no underscores) and to rename constants to have a leading underscore so that they are not exported from the Go package. These names were updated in the C code. The C code was also changed to drop the thread-local variable m, as was done some time ago in the gc sources. Now the m field is always accessed using g->m, where g is the single remaining thread-local variable. This in turn required some adjustments to set g->m correctly in all cases. Also pass the new -fgo-compiling-runtime option when compiling the runtime package, although that option doesn't do anything yet. Reviewed-on: https://go-review.googlesource.com/28051 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239872 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-15 cmd/go: ignore errors from go/build for standard packagesian
The go/build package does not know that gccgo's standard packages don't have source, and will report an error saying that it can not find them. Work around that in the cmd/go sources, since the go/build sources don't currently have a list of standard packages. This should get a real fix in the master sources, somehow. Fixes golang/go#16701. Reviewed-on: https://go-review.googlesource.com/27052 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239486 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-13 libgo: don't unset in shell scriptian
Reportedly ksh fails to unset a variable that was not previously set. Change match.sh and gotest to not unset LANG, but instead set LANG=C. Also don't combine exporting and setting variable in a single statement. Reviewed-on: https://go-review.googlesource.com/26999 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239443 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-13 crypto/aes, hash/crc32: ignore s390x specific files for nowian
These files are used to select s390x assembler support in the gc toolchain. We don't currently have that support, as it is written in the cmd/asm syntax rather than gas syntax. Mark the files to be ignored for now, falling back to the default implementations. Patch by Andreas Krebbel. Reviewed-on: https://go-review.googlesource.com/26994 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239442 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-13 syscall: remove exec_solaris_test.goian
It is testing functionality that gccgo does not need and does not support. Reviewed-on: https://go-review.googlesource.com/26992 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239438 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-11 os: fix build tags for dir_regfile.goian
We want to build dir_regfile.go if not GNU/linux, and not solaris/386, and not solaris/sparc. The latter two conditions were incorrect. To write ! solaris/386 we have to write !solaris !386. I forgot De Morgan's Law. Reviewed-on: https://go-review.googlesource.com/26870 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239393 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-09 mksysinfo.sh: always define CLONE_NEWNETian
CLONE_NEWNET is needed to compile the syscall tests on GNU/Linux. The symbol is not defined in the CentOS 5.11 header files. Patch from Uros Bizjak. Reviewed-on: https://go-review.googlesource.com/26630 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239296 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-08 text/template: reduce maxExecDepth for gccgo furtherian
We already lowered the limit of recursive template invocations from 100,000 to 10,000, but the tests still fail occasionally on x86_64-pc-linux-gnu when using GNU ld (so that split stacks are not fully functional). Reduce the limit further, to 1000, enough so that the test passes consistently. Permitting 1000 recursive template invocations still seems capacious enough for real world use. Reviewed-on: https://go-review.googlesource.com/25590 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239261 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-08 libgo: don't have .lo depend on .lo.depian
Having each .lo depend on the corresponding .lo.dep caused too many rebuilds, because the .lo.dep files are rebuilt when Makefile changes. Instead, if the .lo.dep file changes, remove the .lo file. Reviewed-on: https://go-review.googlesource.com/25588 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239258 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-08 testsuite: fix gotest for absolute srcdirian
The recent changes to Makefile.am mean that if you configure with an absolute path as srcdir then gotest will be invoked with absolute paths for the files. That case never worked. This patch fixes it. Reviewed-on: https://go-review.googlesource.com/25587 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239256 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-08 PR go/72814ian
runtime: treat zero-sized result value as void Change the FFI interface to treat a call to a function that returns a zero-sized result as a call to a function that returns void. This is part of the fix for https://gcc.gnu.org/PR72814. On 32-bit SPARC systems, a call to a function that returns a non-zero-sized struct is followed by an unimp instruction that describes the size of the struct. The function returns to the address after the unimp instruction. The libffi library can not represent a zero-sized struct, so we wind up treating it as a 1-byte struct. Thus in that case libffi calls the function with an unimp instruction, but the function does not adjust the return address. The result is that the program attempts to execute the unimp instruction, causing a crash. This is part of a change that fixes the crash by treating all functions that return zero bytes as functions that return void. Reviewed-on: https://go-review.googlesource.com/25585 * go-gcc.cc (Gcc_backend::function_type): If the return type is zero bytes, treat the function as returning void. (return_statement): If the return type is zero bytes, don't actually return any values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239252 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-07 internal/syscall/unix: fix syscalls for alpha, ia64, s390ian
Also change the configure script to set GOARCH correctly for ia64, and add ia64 as a processor to match.sh and gotest. Reviewed-on: https://go-review.googlesource.com/25549 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239225 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-06 libgo: fix getrandom build for 32-bit ppcian
Add a ppc build constraint for internal/syscall/unix. Reviewed-on: https://go-review.googlesource.com/25547 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239210 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-06 libgo: change build procedure to use build tagsian
Previously the libgo Makefile explicitly listed the set of files to compile for each package. For packages that use build tags, this required a lot of awkward automake conditionals in the Makefile. This CL changes the build to look at the build tags in the files. The new shell script libgo/match.sh does the matching. This required adjusting a lot of build tags, and removing some files that are never used. I verified that the exact same sets of files are compiled on amd64 GNU/Linux. I also tested the build on i386 Solaris. Writing match.sh revealed some bugs in the build tag handling that already exists, in a slightly different form, in the gotest shell script. This CL fixes those problems as well. The old code used automake conditionals to handle systems that were missing strerror_r and wait4. Rather than deal with those in Go, those functions are now implemented in runtime/go-nosys.c when necessary, so the Go code can simply assume that they exist. The os testsuite looked for dir_unix.go, which was never built for gccgo and has now been removed. I changed the testsuite to look for dir.go instead. Reviewed-on: https://go-review.googlesource.com/25546 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239189 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-04 runtime: fix incorrectly commented out code in heapdump.cian
Reviewed-on: https://go-review.googlesource.com/25490 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239144 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-04 text/template: reduce maxExecDepth for gccgoian
When using gccgo on systems without full support for split stacks a recursive template can overrun the available stack space. Reduce the limit from 100000 to 10000 to make this less likely. It's still high enough that real uses will work. Reviewed-on: https://go-review.googlesource.com/25467 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239141 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-03 gotest: multiple +build lines must all be trueian
The code that handled +build lines did not correctly require them to all be true. While looking into this I discovered that multiple +build lines were mishandled in a different way, because the shell does not preseve line breaks in backquoted data. Look for the +build token to tell us when we are switching from one +build line to another. Reviewed-on: https://go-review.googlesource.com/25460 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239100 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-26 libgo: bump library version number for 1.7ian
Reviewed-on: https://go-review.googlesource.com/25211 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238743 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-26 os/user: fix Solaris declaration.ian
Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/25210 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238742 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-22 libgo: update to go1.7rc3ian
Reviewed-on: https://go-review.googlesource.com/25150 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238662 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-23 cmd/go: bring in final version of gccgo pkg-config supportian
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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235380 138bc75d-0d04-0410-961f-82ee72b054a4
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