aboutsummaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)AuthorFilesLines
2016-08-15cmd/go: ignore errors from go/build for standard packagesIan Lance Taylor1-0/+7
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 From-SVN: r239486
2016-08-13libgo: don't unset in shell scriptIan Lance Taylor2-5/+6
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 From-SVN: r239443
2016-08-13crypto/aes, hash/crc32: ignore s390x specific files for nowIan Lance Taylor3-0/+6
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 From-SVN: r239442
2016-08-13syscall: remove exec_solaris_test.goIan Lance Taylor1-37/+0
It is testing functionality that gccgo does not need and does not support. Reviewed-on: https://go-review.googlesource.com/26992 From-SVN: r239438
2016-08-11os: fix build tags for dir_regfile.goIan Lance Taylor1-2/+2
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 From-SVN: r239393
2016-08-09mksysinfo.sh: always define CLONE_NEWNETIan Lance Taylor1-0/+3
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 From-SVN: r239296
2016-08-08text/template: reduce maxExecDepth for gccgo furtherIan Lance Taylor1-2/+2
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 From-SVN: r239261
2016-08-08libgo: don't have .lo depend on .lo.depIan Lance Taylor2-310/+316
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 From-SVN: r239258
2016-08-08testsuite: fix gotest for absolute srcdirIan Lance Taylor1-24/+42
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 From-SVN: r239256
2016-08-08re PR go/72814 (reflect FAILs on 32-bit Solaris/SPARC: SIGILL)Ian Lance Taylor1-0/+11
PR go/72814 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. From-SVN: r239252
2016-08-07internal/syscall/unix: fix syscalls for alpha, ia64, s390Ian Lance Taylor7-6/+58
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 From-SVN: r239225
2016-08-06libgo: fix getrandom build for 32-bit ppcIan Lance Taylor1-1/+1
Add a ppc build constraint for internal/syscall/unix. Reviewed-on: https://go-review.googlesource.com/25547 From-SVN: r239210
2016-08-06libgo: change build procedure to use build tagsIan Lance Taylor108-5851/+1164
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 From-SVN: r239189
2016-08-04runtime: fix incorrectly commented out code in heapdump.cIan Lance Taylor1-2/+4
Reviewed-on: https://go-review.googlesource.com/25490 From-SVN: r239144
2016-08-04text/template: reduce maxExecDepth for gccgoIan Lance Taylor1-1/+3
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 From-SVN: r239141
2016-08-03gotest: multiple +build lines must all be trueIan Lance Taylor1-45/+49
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 From-SVN: r239100
2016-07-26libgo: bump library version number for 1.7Ian Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/25211 From-SVN: r238743
2016-07-26os/user: fix Solaris declaration.Ian Lance Taylor1-1/+1
Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/25210 From-SVN: r238742
2016-07-22libgo: update to go1.7rc3Ian Lance Taylor1154-16623/+51784
Reviewed-on: https://go-review.googlesource.com/25150 From-SVN: r238662
2016-04-23cmd/go: bring in final version of gccgo pkg-config supportIan Lance Taylor1-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
2016-04-13libgo: update to Go 1.6.1 releaseIan Lance Taylor12-15/+61
Reviewed-on: https://go-review.googlesource.com/22007 From-SVN: r234958
2016-04-12reflect: change Value.Call results to not be addressableIan Lance Taylor2-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
2016-04-02runtime: Use atomic load for in entersyscall.Ian Lance Taylor1-1/+1
Reportedly fixes PPC64 deadlock. From a comment by Gabriel Russell. Fixes golang/go#15051. Reviewed-on: https://go-review.googlesource.com/21450 From-SVN: r234694
2016-02-26re PR go/69966 (libgo: Port syscall.SetsockoptUcred from golang)Ian Lance Taylor4-1/+37
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
2016-02-24runtime: lock M during cgo callIan Lance Taylor1-0/+4
cgo should lock the M. See also https://golang.org/cl/18882 . Reviewed-on: https://go-review.googlesource.com/18883 From-SVN: r233670
2016-02-18libgo: Update to final Go 1.6 release.Ian Lance Taylor43-152/+1340
Reviewed-on: https://go-review.googlesource.com/19592 From-SVN: r233515
2016-02-12runtime: For c-archive/c-shared, install signal handlers synchronously.Ian Lance Taylor4-5/+15
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 From-SVN: r233393
2016-02-10re PR go/66904 (cmd/go: "#cgo pkg-config:" comments do not work with gccgo)Ian Lance Taylor1-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
2016-02-10re PR go/69511 (G.gcstack_size uses uintptr instead of size_t)Ian Lance Taylor2-2/+2
PR go/69511 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 From-SVN: r233260
2016-02-09re PR go/69357 (libgo refers to _end in a non-weak way)Ian Lance Taylor3-2/+15
PR go/69537 runtime: Don't refer to _end symbol in shared library. Fixes GCC PR 69357. Reviewed-on: https://go-review.googlesource.com/19362 From-SVN: r233235
2016-02-04libgo: bump version number for upgrade to 1.6rc1Ian Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/19233 From-SVN: r233156
2016-02-03libgo: Update to go1.6rc1.Ian Lance Taylor725-11813/+43703
Reviewed-on: https://go-review.googlesource.com/19200 From-SVN: r233110
2016-02-03compiler, runtime: mark stub methods, ignore them in runtime.Caller.Ian Lance Taylor1-0/+2
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 From-SVN: r233098
2016-01-11re PR go/68980 (ps -o cmd in gotest isn't portable)Ian Lance Taylor1-1/+1
PR 68980 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 From-SVN: r232234
2015-12-18syscall: Add definition for NLA_HDRLENIan Lance Taylor1-3/+10
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 From-SVN: r231796
2015-11-26re PR go/61303 (gccgo: segfault, regression since 4.8.2)Ian Lance Taylor1-6/+10
PR go/61303 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 From-SVN: r230922
2015-11-23re PR go/68496 ([libgo] reflect test fails on Linux x86-64)Ian Lance Taylor1-0/+6
PR go/68496 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 From-SVN: r230776
2015-11-21re PR go/66378 (libgo syscall.Sendfile() does not honor/use offset argument)Ian Lance Taylor2-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
2015-11-21re PR go/65785 (libgo TestIPv4MulticastListener test fails on machine with ↵Ian Lance Taylor1-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
2015-11-21re PR go/66574 (Time is provided in millisecond precision instead of ↵Ian Lance Taylor3-5/+62
nanoseconds as described in go documentation) PR go/66574 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 From-SVN: r230694
2015-11-20re PR go/68072 (malformed DWARF TagVariable entry)Ian Lance Taylor1-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
2015-11-20cmd: Use correct install tool dir with gccgoIan Lance Taylor2-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
2015-11-10libgo: use Solaris sendfile lib, fix Solaris _in6_addr_t fieldsIan Lance Taylor3-0/+63
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 From-SVN: r230132
2015-11-10re PR go/68255 (cgo-generated constructor not being called)Ian Lance Taylor1-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
2015-11-07re PR go/66138 (json decoder Decode function fails for some structure return ↵Ian Lance Taylor7-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
2015-11-06libgo: Solaris portability fixes.Ian Lance Taylor9-37/+63
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
2015-11-04gotest: fix handling of --goarch optionIan Lance Taylor3-17/+7
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 From-SVN: r229734
2015-11-03mksysinfo.sh: Make sure that CLONE_NEWUSER is defined.Ian Lance Taylor1-0/+5
Reviewed-on: https://go-review.googlesource.com/16588 From-SVN: r229711
2015-11-02libgo: Bump version number.Ian Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/16583 From-SVN: r229686
2015-11-02mksysinfo.sh: Handle TIOCGPGRP if too complex for -dump-go-spec.Ian Lance Taylor1-0/+8
Reviewed-on: https://go-review.googlesource.com/16580 From-SVN: r229676