Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Add a ppc build constraint for internal/syscall/unix.
Reviewed-on: https://go-review.googlesource.com/25547
From-SVN: r239210
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/25490
From-SVN: r239144
|
|
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
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/25211
From-SVN: r238743
|
|
Patch from Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/25210
From-SVN: r238742
|
|
Reviewed-on: https://go-review.googlesource.com/25150
From-SVN: r238662
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/22007
From-SVN: r234958
|
|
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
|
|
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
|
|
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
|
|
cgo should lock the M.
See also https://golang.org/cl/18882 .
Reviewed-on: https://go-review.googlesource.com/18883
From-SVN: r233670
|
|
Reviewed-on: https://go-review.googlesource.com/19592
From-SVN: r233515
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/19233
From-SVN: r233156
|
|
Reviewed-on: https://go-review.googlesource.com/19200
From-SVN: r233110
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/16588
From-SVN: r229711
|
|
Reviewed-on: https://go-review.googlesource.com/16583
From-SVN: r229686
|
|
Reviewed-on: https://go-review.googlesource.com/16580
From-SVN: r229676
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/16534
From-SVN: r229645
|
|
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
From-SVN: r229636
|
|
Reviewed-on: https://go-review.googlesource.com/16527
From-SVN: r229624
|
|
It is not needed due to the removal of the ctx field.
Reviewed-on: https://go-review.googlesource.com/16525
From-SVN: r229616
|