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
If the compiler supports split-stack but we are using a gold linker that
does not, as happens on PPC with current GCC but old gold, then we need
to compile the Go code with -fno-split-stack to avoid a linker error
avoid the inability to call from split-stack code to non-split-stack
code.
Reviewed-on: https://go-review.googlesource.com/14598
From-SVN: r227811
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
From Rainer Orth.
Solaris 12 changes the stat_[amc]tim members of struct stat from
timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo
build. The following patch checks for this change and uses the common
stat_atim.go if appropriate.
Reviewed-on: https://go-review.googlesource.com/14495
From-SVN: r227665
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.
Fixesgolang/go#11469
Reviewed-on: https://go-review.googlesource.com/11946
From-SVN: r226533
These changes permit using the go tool from the upcoming Go
1.5 release with -buildmode=c-archive to build gccgo code into
an archive file that can be linked with a C program.
From-SVN: r222594
PR go/63731
libgo: Build and install libnetgo.a
libnetgo.a provides the net
package built with the netgo
tag enabled. This provides the
netgo fallback solution for gccgo.
This lib must be explicitly linked
in using the -gccgoflags, so is
not included by default.
From-SVN: r221906
PR go/65570
libgo/Makefile.am: add runtime/cgo to list of standard packages
The runtime/cgo package is treated specially by the go tool.
It needs to know that it is always available for gccgo.
From-SVN: r221673
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
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
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
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
Different compilers may have different release cadences or ABI
incompatibilities, so it does not make sense to use the same library
name for runtime libraries intended for different compilers.
This CL causes a libgo built by llgo to receive the name libgo-llgo.
Likewise, libgobegin is named libgobegin-llgo.
From-SVN: r217583
From Dominik Vogt.
* libgo/go/syscall/libcall_linux_s390.go: New file for s390 support.
* libgo/go/syscall/syscall_linux_s390.go: Ditto.
* libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support.
* libgo/go/syscall/syscall_linux_s390x.go: Ditto.
* libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and
s390x.
* libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and
s390x
* libgo/mksysinfo.sh: Ditto.
(upcase_fields): New helper function
* libgo/go/debug/elf/file.go (applyRelocations): Implement relocations
on s390x.
(applyRelocationsS390x): Ditto.
(DWARF): Ditto.
* libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations.
(r390Strings): Ditto.
(String): Helper function for S390 relocations.
(GoString): Ditto.
* libgo/go/reflect/makefuncgo_s390.go: New file.
(S390MakeFuncStubGo): Implementation of s390 abi.
* libgo/go/reflect/makefuncgo_s390x.go: New file.
(S390xMakeFuncStubGo): Implementation of s390x abi.
* libgo/go/reflect/makefunc_s390.c: New file.
(makeFuncStub): s390 and s390x specific implementation of function.
* libgo/go/reflect/makefunc.go
(MakeFunc): Add support for s390 and s390x.
(makeMethodValue): Ditto.
(makeValueMethod): Ditto.
* libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto.
(go_reflect_makefunc_file): Ditto.
* libgo/go/reflect/makefunc_dummy.c: Ditto.
* libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype
for use in makefunc_s390.c.
(__go_makefunc_returning): Ditto.
* libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the
arguments of the clone system call for s390[x].
* libgo/configure.ac (is_s390): New variable.
(is_s390x): Ditto
(LIBGO_IS_S390): Ditto.
(LIBGO_IS_S390X): Ditto.
(GOARCH): Support s390 and s390x.
* libgo/go/go/build/build.go (cgoEnabled): Ditto.
* libgo/go/go/build/syslist.go (goarchList): Ditto.
From-SVN: r217106
This introduces the "bench" build target, which can be used to run
all benchmarks.
It is also possible to run subsets of benchmarks with the
"package/check" build targets by setting GOBENCH to a matching regex.
From-SVN: r212212
This revision was committed January 7, 2014. The next
revision deleted runtime/mfinal.c. That will be done in a
subsequent merge.
This merge changes type descriptors to add a zero field,
pointing to a zero value for that type. This is implemented
as a common variable.
* go-gcc.cc (Gcc_backend::implicit_variable): Add is_common and
alignment parameters. Permit init parameter to be NULL.
From-SVN: r211249
This adds the --without-libatomic configure option, which is useful for building libgo
with a non-gcc compiler.
It disables libgo's dependency on libatomic. This
is useful for platforms where it is known that the libatomic runtime
functions are not required, or where the compiler automatically
provides an implementation of them.
From-SVN: r211065
If cmd/go is rebuilt using -compiler gccgo the version of go/build that is linked into that cmd/go will not function properly as the list of file suffixes know as operating systems or architectures is incorrect.
From-SVN: r204794
This changes the representation of a Go value of function type
from being a pointer to function code (like a C function
pointer) to being a pointer to a struct. The first field of
the struct points to the function code. The remaining fields,
if any, are the addresses of variables referenced in enclosing
functions. For each call to a function, the address of the
function descriptor is passed as the last argument.
This lets us avoid generating trampolines, and removes the use
of writable/executable sections of the heap.
From-SVN: r200181