aboutsummaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)AuthorFilesLines
2018-01-14go/types: implement SizesFor for gccgoIan Lance Taylor8-281/+350
Move the architecture-specific settings out of configure.ac into a new shell script goarch.sh. Use the new script to collect the values for all architectures to make them available in go/types. Also fix cmd/vet to pass the right compiler when it calls SizesFor. This fixes cmd/vet for systems that are not implemented in the gc toolchain, such as alpha and ia64. Reviewed-on: https://go-review.googlesource.com/87635 From-SVN: r256655
2018-01-11re PR go/83794 (misc/cgo/test uses gigabytes of memory)Ian Lance Taylor1-2/+3
PR go/83794 misc/cgo/test: avoid endless loop when we can't parse notes Reviewed-on: https://go-review.googlesource.com/87416 From-SVN: r256553
2018-01-11debug/dwarf: formStrp uses a 64-bit value for 64-bit DWARFIan Lance Taylor1-1/+12
No test as the only system I know that uses 64-bit DWARF is AIX. Backport of https://golang.org/cl/84379, which will be in Go 1.11. Backporting now for AIX support in gccgo. Reviewed-on: https://go-review.googlesource.com/87296 From-SVN: r256474
2018-01-10os, syscall: handle _st_timespec for AIX statIan Lance Taylor4-2/+67
Reviewed-on: https://go-review.googlesource.com/87197 From-SVN: r256450
2018-01-10libgo: add platform support for SuperHIan Lance Taylor11-14/+78
Reviewed-on: https://go-review.googlesource.com/84555 From-SVN: r256446
2018-01-10Add missing .a files.Ian Lance Taylor5-0/+0
Add missing .a files. These should have been committed with the update to go1.10beta1, but were skipped because by default Subversion ignores all files matching *.a. From-SVN: r256442
2018-01-10re PR c/82922 (Request: add -Wstrict-prototypes to -Wextra as K&R style is ↵Ian Lance Taylor5-11/+7
obsolescent) PR c/82922 runtime, syscall: use full prototypes in C code Based on patch by Martin Sebor. Reviewed-on: https://go-review.googlesource.com/86815 From-SVN: r256437
2018-01-10exp: remove exp/proxy and exp/terminal packagesIan Lance Taylor12-1391/+30
The exp/proxy package was removed from the master library in https://golang.org/cl/6461056 (August, 2012). The exp/terminal package was removed from the master library in https://golang.org/cl/5970044 (March, 2012). I'm not sure why they lingered in the gofrontend copy, but let's finally remove them now. Reviewed-on: https://go-review.googlesource.com/87138 From-SVN: r256435
2018-01-10cmd/go: check for another GCC error messageIan Lance Taylor1-1/+3
GCC always recognizes the -fsplit-stack option, but then tests whether it is supported by the selected target. If not, it reports cc1: error: ‘-fsplit-stack’ is not supported by this compiler configuration Check for that error message when deciding whether a compiler option works. Reviewed-on: https://go-review.googlesource.com/87137 From-SVN: r256433
2018-01-10runtime: fix makemap calls in __go_construct_mapIan Lance Taylor1-3/+3
The signature of makemap changed with the update to 1.10beta1, but I forgot to update the call from C code. Reviewed-on: https://go-review.googlesource.com/87135 From-SVN: r256431
2018-01-10runtime: work around escaping closure in export_test.goIan Lance Taylor1-7/+7
When compiling runtime, it is not allowed for local variables and closures to be heap allocated. In one test, there is a go statement with a closure. In the gc compiler, it distinguishes capturing variable by value vs. by address, and rewrites it to passing the captured values as arguments. Currently we don't have this, and the escape analysis decides to heap allocate the closure and also the captured variables, which is not allowed. Work around it by passing the variables explicitly. This is in preparation of turning on escape analysis for the runtime. Reviewed-on: https://go-review.googlesource.com/86245 From-SVN: r256419
2018-01-10runtime: noescape some functions/variablesIan Lance Taylor5-10/+28
This is in preparation of turning on escape analysis for the runtime. - In gccgo, systemstack is implemented with mcall, which is not go:noescape. Wrap the closure in noescape so the escape analysis does not think it escapes. - Mark some C functions go:noescape. They do not leak arguments. - Use noescape function to make a few local variables' addresses not escape. The escape analysis cannot figure out because they are assigned to pointer indirections. Reviewed-on: https://go-review.googlesource.com/86244 From-SVN: r256418
2018-01-10cmd/go: add AIX supportIan Lance Taylor1-6/+24
For gccgo code avoid --whole-archive and -(. Use -blibpath instead of -rpath. Reviewed-on: https://go-review.googlesource.com/86956 From-SVN: r256417
2018-01-10libgo: add aix build tagsIan Lance Taylor4-4/+4
Reviewed-on: https://go-review.googlesource.com/86936 From-SVN: r256416
2018-01-09os/signal/internal/pty: build on SolarisIan Lance Taylor1-1/+1
Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/87037 From-SVN: r256399
2018-01-09libgo: update to Go1.10beta1Ian Lance Taylor1093-22732/+72898
Update the Go library to the 1.10beta1 release. Requires a few changes to the compiler for modifications to the map runtime code, and to handle some nowritebarrier cases in the runtime. Reviewed-on: https://go-review.googlesource.com/86455 gotools/: * Makefile.am (go_cmd_vet_files): New variable. (go_cmd_buildid_files, go_cmd_test2json_files): New variables. (s-zdefaultcc): Change from constants to functions. (noinst_PROGRAMS): Add vet, buildid, and test2json. (cgo$(EXEEXT)): Link against $(LIBGOTOOL). (vet$(EXEEXT)): New target. (buildid$(EXEEXT)): New target. (test2json$(EXEEXT)): New target. (install-exec-local): Install all $(noinst_PROGRAMS). (uninstall-local): Uninstasll all $(noinst_PROGRAMS). (check-go-tool): Depend on $(noinst_PROGRAMS). Copy down objabi.go. (check-runtime): Depend on $(noinst_PROGRAMS). (check-cgo-test, check-carchive-test): Likewise. (check-vet): New target. (check): Depend on check-vet. Look at cmd_vet-testlog. (.PHONY): Add check-vet. * Makefile.in: Rebuild. From-SVN: r256365
2018-01-06libgo: fix GOARCH_CACHELINESIZE on ia64Ian Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/85256 From-SVN: r256306
2017-12-16os: pass -s to hostname on AIXIan Lance Taylor1-3/+9
Reviewed-on: https://go-review.googlesource.com/79375 From-SVN: r255738
2017-12-16syscall: emulate Flock on AIXIan Lance Taylor1-0/+22
Reviewed-on: https://go-review.googlesource.com/79095 From-SVN: r255737
2017-12-06libgo: remove -fplan9-extensions from CFLAGSIan Lance Taylor2-2/+2
Remove -fplan9-extensions from the CFLAGS used for libgo (no longer needed since the runtime was converted from C to Go). Reviewed-on: https://go-review.googlesource.com/82177 From-SVN: r255445
2017-12-02runtime: export cgoCheck functionsIan Lance Taylor1-0/+4
The functions cgoCheckPointer and cgoCheckResult are called by code generated by cgo. That means that we need to export them using go:linkname, as otherwise they are local symbols. The cgo code currently uses weak references to only call the symbols if they are defined, which is why it has been working--the cgo code has not been doing any checks. Reviewed-on: https://go-review.googlesource.com/80295 From-SVN: r255347
2017-11-23cmd/go, go/internal/gccgoimporter: pass -X to ar on AIXIan Lance Taylor2-3/+12
Reviewed-on: https://go-review.googlesource.com/72930 From-SVN: r255090
2017-11-22libgo: don't use grep -q in mksigtab.shIan Lance Taylor1-1/+1
Solaris grep does not support the -q option. Reviewed-on: https://go-review.googlesource.com/79239 From-SVN: r255042
2017-11-21libgo: fix makefile bugletIan Lance Taylor2-2/+2
Fix a small bug in the libgo Makefile recipe that constructs the directory from which to pick up libgcc_s.so ; the gccgo invocation with -print-libgcc-file-name was missing the flags, which meant that for -m32 builds we'd see the 64-bit libgcc dir. Reviewed-on: https://go-review.googlesource.com/78836 From-SVN: r254984
2017-11-14Adapt Solaris 12 referencesRainer Orth1-2/+2
libgcc: * config.host (*-*-solaris2*): Adapt comment for Solaris 12 renaming. * config/sol2/crtpg.c (__start_crt_compiler): Likewise. * configure.ac (libgcc_cv_solaris_crts): Likewise. * configure: Regenerate. gcc: * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since Solaris 11. Update comment. * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12 renaming. * config/sol2.h (STARTFILE_SPEC): Likewise. * configure: Regenerate. gcc/testsuite: * lib/target-supports.exp (check_effective_target_pie): Adapt comment for Solaris 12 renaming. * gcc.dg/torture/pr60092.c: Remove *-*-solaris2.11* dg-xfail-run-if. From-SVN: r254737
2017-11-14libgo: adapt Solaris 12 referencesIan Lance Taylor5-11/+11
With the change in the Solaris release model (no more major releases like Solaris 12 but only minor ones like 11.4), the Solaris 12 references in GCC need to be adapted. Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/77490 From-SVN: r254729
2017-11-09sync/atomic, runtime/internal/atomic: don't assume reads from 0 failIan Lance Taylor4-13/+16
For a misaligned address force a panic rather than assuming that reading from the address 0 will cause one. Reviewed-on: https://go-review.googlesource.com/69850 From-SVN: r254610
2017-11-06libgo: pass flags to recursive makeIan Lance Taylor2-4/+4
"make check" runs make recursively to check each package. Pass the flags through. So it is possible to run "make check" with different settings easily. Reviewed-on: https://go-review.googlesource.com/76029 From-SVN: r254475
2017-10-20debug/dwarf: support 64-bit DWARF in byte order checkIan Lance Taylor5-16/+87
Also fix 64-bit DWARF to read a 64-bit abbrev offset in the compilation unit. This is a backport of https://golang.org/cl/71171, which will be in the Go 1.10 release, to the gofrontend copy. Doing it now because AIX is pretty much the only system that uses 64-bit DWARF. Reviewed-on: https://go-review.googlesource.com/72250 From-SVN: r253955
2017-10-11runtime: fix issues on AIX about uintptr(_t)Ian Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/69891 From-SVN: r253664
2017-09-29debug/elf: support 32-bit SPARC relocsIan Lance Taylor1-0/+42
Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/67111 From-SVN: r253292
2017-09-29mksysinfo: strip locale structsIan Lance Taylor2-0/+2
We don't need them, and this fixes the build when using uClibc-ng 1.0.26 as originally reported at https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01930.html Reviewed-on: https://go-review.googlesource.com/67110 From-SVN: r253291
2017-09-27net: check Getsockname error returnIan Lance Taylor1-2/+8
Reviewed-on: https://go-review.googlesource.com/64550 From-SVN: r253231
2017-09-22debug/xcoff,cmd: add XCOFF supportIan Lance Taylor18-21/+1112
Reviewed-on: https://go-review.googlesource.com/64592 From-SVN: r253105
2017-09-20libgo: fix build when using -enable-static=noIan Lance Taylor2-2/+26
With -enable-static=no we don't build non-pic objects, but libgotool.a is built from non-pic objects. Build the packages that go into libgotool.a in static mode in all cases. Also ensure that internal test packages are built, since nothing explicitly depended on them. Reviewed-on: https://go-review.googlesource.com/65050 From-SVN: r253042
2017-09-20syscall: enable ParseDirent for AIXIan Lance Taylor3-1/+21
Reviewed-on: https://go-review.googlesource.com/64990 From-SVN: r253022
2017-09-20syscall: workaround for getsockname bug in AIXIan Lance Taylor4-1/+188
Reviewed-on: https://go-review.googlesource.com/64552 From-SVN: r253021
2017-09-20internal,net,os,runtime,syscall: fixes for AIX following update to go1.9Ian Lance Taylor16-19/+154
Reviewed-on: https://go-review.googlesource.com/64551 From-SVN: r253016
2017-09-20runtime: restore "goroutine in C code" messageIan Lance Taylor2-1/+2
In the 1.9 upgrade I took out the word "goroutine" from a traceback showing a goroutine running in C code, to let TestCgoNumGoroutine pass. However, it turns out that some code is actually checking for that string; for example, https://github.com/grpc/grpc-go/blob/master/test/leakcheck/leakcheck.go#L44 So keep the message the same, and change the test. Reviewed-on: https://go-review.googlesource.com/64850 From-SVN: r252991
2017-09-18runtime: always initialize str field in __go_string_slice resultIan Lance Taylor1-4/+7
Reviewed-on: https://go-review.googlesource.com/64110 From-SVN: r252953
2017-09-15syscall: fixes for SolarisIan Lance Taylor3-2/+14
Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/64170 From-SVN: r252866
2017-09-14libgo: update to go1.9Ian Lance Taylor980-20310/+56791
Reviewed-on: https://go-review.googlesource.com/63753 From-SVN: r252767
2017-09-14compiler, runtime: simplify select and channel operationsIan Lance Taylor3-108/+78
In preparation for upgrading libgo to the 1.9 release, this approximately incorporates https://golang.org/cl/37661 and https://golang.org/cl/38351. CL 37661 changed the gc compiler such that the select statement simply returns an integer which is then used as the argument for a switch. Since gccgo already worked that way, this just adjusts the switch code to look like the gc switch code by removing the explicit case index expression and calculating it from the order of calls to selectsend, selectrecv, and selectdefault. CL 38351 simplifies the channel code by not passing the unused channel type descriptor pointer. Reviewed-on: https://go-review.googlesource.com/62730 From-SVN: r252749
2017-09-14compiler, reflect: fix struct field names for embedded aliasesIan Lance Taylor3-93/+89
This adds much of https://golang.org/cl/35731 and https://golang.org/cl/35732 to the gofrontend code. This is a step toward updating libgo to the 1.9 release. The gofrontend already supports type aliases, and this is required for correct support of type aliases when used as embedded fields. The change to expressions.cc is to handle the << 1, used for the newly renamed offsetAnon field, in the constant context used for type descriptor initialization. Reviewed-on: https://go-review.googlesource.com/62710 From-SVN: r252746
2017-08-31mksysinfo: fix in6_addr in mld_hdr_t for SolarisIan Lance Taylor2-0/+8
Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/60732 From-SVN: r251574
2017-08-29net/internal/socktest: build sys_unix.go on AIXIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/59913 From-SVN: r251440
2017-08-29libgo: netinet/icmp6.h require netinet/in.h on AIXIan Lance Taylor2-2/+21
Reviewed-on: https://go-review.googlesource.com/59912 From-SVN: r251439
2017-08-29libgo: fix Stat_t on AIXIan Lance Taylor1-0/+1
Reviewed-on: https://go-review.googlesource.com/59911 From-SVN: r251436
2017-08-29runtime: make go-nosys.c compile with !HAVE_SYSCALLIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/59910 From-SVN: r251435
2017-08-29runtime: fix lfstack for 64-bit AIXIan Lance Taylor1-0/+18
Reviewed-on: https://go-review.googlesource.com/57550 From-SVN: r251420