Remove the old locking code written in C.
Add a shell script mkrsysinfo.sh to generate the runtime_sysinfo.go
file, so that we can get Go copies of the system time structures and
other types.
Tweak the compiler so that when compiling the runtime package the
address operator does not cause local variables to escape. When the gc
compiler compiles the runtime, an escaping local variable is treated as
an error. We should implement that, instead of this change, when escape
analysis is turned on.
Tweak the compiler so that the generated C header does not include names
that start with an underscore followed by a non-upper-case letter,
except for the special cases of _defer and _panic. Otherwise we
translate C types to Go in runtime_sysinfo.go and then generate those Go
types back as C types in runtime.inc, which is useless and painful for
the C code.
Change entersyscall and friends to take a dummy argument, as the gc
versions do, to simplify calls from the shared code.
Reviewed-on: https://go-review.googlesource.com/30079
From-SVN: r240657
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
From-SVN: r240083
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
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
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
PPC has split-stack support in current GCC, but old version of gold will
reject attempts to link PPC split-stack and non-split-stack code
together. Test for that, and don't compile the C code with
-fsplit-stack if it doesn't work.
Reviewed-on: https://go-review.googlesource.com/14594
From-SVN: r227802
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
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 supports clang, which by default issues warnings about
unused command line arguments, a habit that interacts poorly
with configure scripts.
From-SVN: r215699
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
I am reliably informed that the architecture name and letter for the
plan9/inferno compilers for 64-bit ARM systems will be "arm64" and "7"
respectively, so let's get that bit in nice and early.
From Michael Hudson-Doyle.
https://codereview.appspot.com/34830045/
From-SVN: r206374
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