aboutsummaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)AuthorFilesLines
2015-07-25syscall: Add ioctl consts from if_tun.hIan Lance Taylor1-0/+187
During the gccgo build define constants from some header files are processed by mksysinfo.sh and added to syscall.go. In some cases the constants are based on macros which are not processed correctly by mksysinfo.sh. This adds the support to generate the correct values for the TUN* constants from linux/if_tun.h. Fixes golang/go#11707 Reviewed-on: https://go-review.googlesource.com/12491 From-SVN: r226196
2015-07-14compiler,runtime: Determine if allocations need new pointers in runtime.Ian Lance Taylor1-9/+2
As the removed comment states, if the package being compiled played certain tricks with pointers that looked like integers, the compiler might allocate space for new pointers unnecessarily. Since the type information on the heap is now precise, this logic can be moved to the runtime. Reviewed-on: https://go-review.googlesource.com/11581 From-SVN: r225757
2015-07-13syscall: remove calls to Entersyscall & Exitsyscall in GetdentsIan Lance Taylor1-2/+0
The syscall for Getdents in syscall/libcall_linux.go called Entersyscall and Exitsyscall, causing the runtime_sched counts for goroutines to be incorrect. Inconsistent counts caused checkdead in runtime/proc.c to panic. Fixes golang/go#11406 Reviewed-on: https://go-review.googlesource.com/11761 From-SVN: r225745
2015-05-16libgo: Use __USING_SJLJ_EXCEPTIONS__ rather than configure test.Ian Lance Taylor4-121/+3
From Eric Botcazou. From-SVN: r223231
2015-05-11runtime: Fix runtime/pprof test when libgo is not optimized.Ian Lance Taylor1-3/+3
When libgo is not optimized the static function profilealloc in malloc.goc shows up in the stack trace. Rename it to runtime_profilealloc so that runtime/pprof.printStackRecord ignores it. From-SVN: r223006
2015-05-05re PR go/66016 (Accessing nil Func's name results in crash)Ian Lance Taylor1-0/+2
PR go/66016 runtime: Don't crash in Func.Name if the Func is nil. Related to Go issue 10696 From-SVN: r222816
2015-04-29runtime: Support -buildmode=c-shared.Ian Lance Taylor7-8/+333
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
2015-04-24re PR go/65616 (libgobegin.a not compiled with -fPIC)Ian Lance Taylor2-13/+36
PR go/65616 libgo: Compile go-main, in libgobegin, with -fPIC. From-SVN: r222431
2015-04-17re PR go/65798 (runtime.Caller returns ok=true when return data is invalid)Ian Lance Taylor1-1/+1
PR go/65798 runtime: In Caller don't return ok == true if PC == 0. GCC PR 65798 reports that this can happen in some cases. From-SVN: r222204
2015-04-17re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match)Ian Lance Taylor1-0/+4
PR go/64683 runtime/pprof: Assume function with no name is in runtime. GCC PR 65797 causes some of the runtime functions to be compiled with no name in the debug info. This in turn causes the runtime/pprof test to fail as reported in GCC PR 64683. There are no good choices when a function has no name in the debug info, but here we assume that if we see such a function while reading the runtime functions, we assume that it is also a runtime function. From-SVN: r222200
2015-04-17re PR go/64999 (s390x libgo test failure in TestMemoryProfiler)Ian Lance Taylor1-1/+14
PR go/64999 PR go/65180 runtime: Adjust libbacktrace PC value to what runtime.Callers expects. From Lynn Boger. From-SVN: r222196
2015-04-17re PR go/65755 (incorrect reflection of struct fields with gccgo)Ian Lance Taylor2-18/+1
PR go/65755 compiler, runtime, reflect: Use reflection string for type comparisons. Change the runtime and reflect libraries to always use only the type reflection string to determine whether two types are equal. It previously used the PkgPath and Name values for a type name, but that required a PkgPath that did not match the gc compiler. Change the compiler to use the same PkgPath value as the gc compiler in all cases. Change the compiler to put the receiver type in the reflection string for a type defined inside a method. From-SVN: r222194
2015-04-08mksysinfo.sh: Define Solaris zone_net_addr_t struct.Ian Lance Taylor1-0/+5
From Rainer Orth. From-SVN: r221920
2015-04-07re PR go/63731 (Fallback to netgo does not work)Ian Lance Taylor2-31/+89
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
2015-03-31Remove some files that were accidentally committed in 2014.Ian Lance Taylor3-1612/+0
From-SVN: r221802
2015-03-31go/cmd/go: always link external test packages firstIan Lance Taylor3-5/+14
When linking complex packages that use both internal and external tests as well as many dependencies it is critical that the link order be external test package, internal test package, everything else. This change is a back (forward?) port of the same change that canonical have been maintaining on their fork of the go tool for gccgo. Now that gccgo uses the go tool from upstream, this patch should be applied both to the gofrontend and golang/go repos. From-SVN: r221800
2015-03-26re PR go/65587 (C package incomplete/not working for powerpc-linux-gnu)Ian Lance Taylor1-1/+1
PR go/65587 debug/elf: apply relocations for SHT_RELA/EM_PPC From-SVN: r221698
2015-03-26libgo: Fix go/runtime test failure on S390.Ian Lance Taylor2-1/+11
The tests run out of memory on 31-bit S390 systems because it does not have split stacks. From-SVN: r221681
2015-03-25re PR go/65570 (cannot find package "runtime/cgo")Ian Lance Taylor2-2/+2
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
2015-03-24re PR go/65417 (debug/elf: lacks support for PPC relocations)Ian Lance Taylor3-0/+49
PR go/65417 debug/elf: support reading debug info from 32-bit PPC objects This is a backport of http://golang.org/7590 from the master Go library. From-SVN: r221644
2015-03-24re PR go/65462 (Use of 'go get' with gccgo is not finding dependencies ↵Ian Lance Taylor5-31/+65
correctly) 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
2015-03-13libgo/README: Minor updates.Ian Lance Taylor1-9/+8
In particular, mention that libgo should not be stripped. From-SVN: r221427
2015-03-12go/build: cgo works on linux/arm64.Ian Lance Taylor1-0/+1
From-SVN: r221398
2015-03-12re PR go/65404 (cgo tool on powerpc-linux-gnu maybe incomplete)Ian Lance Taylor1-0/+1
PR go/65404 go/build: cgo works on linux/pcc. From-SVN: r221396
2015-03-10re PR go/65353 (unknown ptrSize for $GOARCH "arm64" on aarch64-linux-gnu)Ian Lance Taylor1-10/+32
PR go/65353. cmd/cgo: Add all gccgo GOARCH values to size maps. From-SVN: r221293
2015-03-09re PR go/65349 (go tool crashes, can't compile go code on 32bit linux systems)Ian Lance Taylor1-1/+3
PR go/65349 runtime: Don't crash if explicitly freeing small map. From-SVN: r221292
2015-03-09re PR go/65349 (go tool crashes, can't compile go code on 32bit linux systems)Ian Lance Taylor1-30/+6
PR go/65349 runtime: Don't call malloc from __go_file_line callback. When crashing, we call runtime_printcreatedby which calls __go_file_line which used to call the Go malloc. If we are crashing due to a signal due to heap corruption of some sort, the GO malloc lock might already be held, leading to a crash within a crash. Avoid that by assuming that the libbacktrace strings will stick around, as we already do in go-callers.c. From-SVN: r221291
2015-03-06libgo: Upgrade to Go 1.4.2 release.Ian Lance Taylor18-66/+170
From-SVN: r221245
2015-02-06mksysinfo.sh: Remove _zone_net_addr_t handling.Ian Lance Taylor1-5/+0
From Rainer Orth. The recent godump changes broke Solaris 11.1+ bootstrap in libgo: before, gen-sysinfo.so had type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 _in6_addr; }; } which was filtered out by mksysinfo.sh due to the use of _in6_addr. After the change, there's now type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 [16]byte; Godump_0_align [0]uint32; }; } instead, not filtered, but added a second time by the _zone_net_addr_t code in mksysinfo.sh, which leads to redefinition warnings/errors. Simply removing the old _zone_net_addr_t fragment fixes this and restores bootstrap. From-SVN: r220481
2015-02-06runtime: Add memprofilerate to GODEBUGIan Lance Taylor2-1/+19
Add memprofilerate as a value recognized in the GODEBUG env var. The value provided is used as the new setting for runtime.MemProfileRate, allowing the user to adjust memory profiling. From-SVN: r220470
2015-02-03go/types: Remove unused testdata files.Ian Lance Taylor13-1992/+0
The go/types package was removed in July 2013, but the testdata files were accidentally left behind. From-SVN: r220378
2015-01-23re PR go/64573 (Cmd.Start swallows error from fork()/clone())Ian Lance Taylor1-0/+1
PR go/64573 syscall: Restore line somehow lost in libgo merge. From-SVN: r220068
2015-01-23re PR go/64725 (FAIL: libgo/runtime TestFinalizerType testing.go:278: #2: ↵Ian Lance Taylor1-0/+9
finalizer for type func(*int) didn't run) PR go/64725 runtime: Disable tests that require that a finalizer run. From-SVN: r220067
2015-01-23re PR go/64595 (go programs abort when debug info is stripped)Ian Lance Taylor1-0/+5
PR go/64595 runtime: Don't crash in runtime_callers if no debug info available. From-SVN: r220057
2015-01-21runtime: Add the Go language version information to the Version output.Ian Lance Taylor4-2/+13
From-SVN: r219976
2015-01-20re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match)Ian Lance Taylor1-2/+4
PR go/64683 runtime/pprof: Let memory profiler test pass if value not collected. Since gccgo's GC is not precise, the transient value may not be collected. Let the regexp match that case as well. From-SVN: r219900
2015-01-20runtime: No special case for 386 complex in FFI support.Ian Lance Taylor1-15/+1
All supported libgo 386 targets now have complex support in libffi. From Uros Bizjak. From-SVN: r219877
2015-01-19Add attribute unused to dummy arguments in ffi stubRichard Henderson1-1/+2
From-SVN: r219862
2015-01-19reflect: Fix build for systems that do not define ffi_go_closure.Ian Lance Taylor3-7/+7
From-SVN: r219831
2015-01-16runtime: Add __sparc__ case for SETCONTEXT_CLOBBERS_TLS.Ian Lance Taylor1-0/+24
The glibc setcontext incorrectly modifies %g7 on SPARC. From Richard Henderson. From-SVN: r219778
2015-01-16testing/quick: Revert Alpha specific change.Ian Lance Taylor1-7/+4
No longer needed now that libffi supports complex types. From-SVN: r219777
2015-01-16compiler, reflect, runtime: Use static chain for closures.Richard Henderson21-2344/+84
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
2015-01-16net: Restore earlier Solaris-specific version of setKeepAlivePeriod.Ian Lance Taylor3-2/+34
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
2015-01-16runtime: Use a struct, not void, for an empty struct for libffi.Ian Lance Taylor1-3/+16
A recent libffi upgrade caused the reflect test to fail on 386. The problem case is a function that returns an empty struct--a struct with no fields. The libffi library does not recognize the existence of empty structs, presumably since they can't happen in C. To work around this, the Go interface to the libffi library changes an empty struct to void. This normally works fine, but with the new libffi upgrade it fails for a function that returns an empty struct. On 386 a function that returns a struct is expected to pop the hidden pointer when it returns. So when we convert an empty struct to void, libffi is calling a function that pops the hidden pointer but does not expect that to happen. In the older version of libffi, this didn't matter, because the libffi code for 386 used a frame pointer, so the fact that the stack pointer was wonky when the function returned was ignored as the stack pointer was immediately replaced by the saved frame pointer. In the newer version of libffi, the 386 code is more efficient and does not use a frame pointer, and therefore it matters whether libffi expects the function to pop the hidden pointer or not. This patch changes libgo to convert an empty to a struct with a single field of type void. This seems to be enough to get the test cases working again. Of course the real fix would be to change libffi to handle empty types, but as libffi uses size == 0 as a marker for an uninitialized type, that would be a non-trivial change. From-SVN: r219701
2015-01-15go/build: cgo works on linux/alpha.Ian Lance Taylor1-0/+1
From Uros Bizjak. From-SVN: r219691
2015-01-15reflect: Correct error in conversion of s390x support to Go 1.4.Ian Lance Taylor1-1/+1
From-SVN: r219685
2015-01-15libgo: Bump version number in libgo configure script.Ian Lance Taylor2-2/+2
From-SVN: r219629
2015-01-15Add files somehow left out of last commit (upgrade to Go 1.4).Ian Lance Taylor2-0/+174
From-SVN: r219628
2015-01-15libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.Ian Lance Taylor613-6871/+29850
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
2015-01-10cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" ↵Ian Lance Taylor1-0/+1
toolchain). From-SVN: r219419