aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/cmd/cgo
AgeCommit message (Collapse)AuthorFilesLines
2022-09-22cmd/cgo: add and use runtime/cgo.Incomplete instead of //go:notinheapIan Lance Taylor3-46/+45
This ports https://go.dev/cl/421879 to libgo. This is a quick port to update gofrontend to work with the version of cgo in gc mainline. A more complete port will follow, changing the gc version of cmd/cgo to choose an approach based on feature testing the gccgo in use. Updates golang/go#46731 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/432338
2022-02-11libgo: update to Go1.18beta2Ian Lance Taylor6-27/+188
gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
2021-08-12libgo: update to Go1.17rc2Ian Lance Taylor4-25/+96
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
2021-01-29libgo: update to Go1.16rc1Ian Lance Taylor3-6/+13
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
2020-12-30libgo: update to Go1.16beta1 releaseIan Lance Taylor6-148/+123
This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
2020-11-20libgo: update to Go 1.15.5 releaseIan Lance Taylor1-0/+23
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272146
2020-11-20compiler, libgo: change mangling schemeIan Lance Taylor1-10/+13
Overhaul the mangling scheme to avoid ambiguities if the package path contains a dot. Instead of using dot both to separate components and to mangle characters, use dot only to separate components and use underscore to mangle characters. For golang/go#41862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
2020-11-17cmd/go, cmd/cgo: update gofrontend mangling checksIan Lance Taylor2-105/+16
This is a port of two patches in the master repository. https://golang.org/cl/259298 cmd/cgo: split gofrontend mangling checks into cmd/internal/pkgpath This is a step toward porting https://golang.org/cl/219817 from the gofrontend repo to the main repo. Note that this also corrects the implementation of the v2 mangling scheme to use ..u and ..U where appropriate. https://golang.org/cl/259299 cmd/go: use cmd/internal/pkgpath for gccgo pkgpath symbol For golang/go#37272 For golang/go#41862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/270637
2020-10-27libgo: update to Go 1.15.3 releaseIan Lance Taylor3-1/+20
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265717
2020-09-30libgo: add 32-bit RISC-V (RV32) supportMaciej W. Rozycki1-0/+2
Add support for the 32-bit RISC-V (RV32) ISA matching the 64-bit RISC-V (RV64) port except for async preemption added as a stub only. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251179
2020-08-26cmd: add -maix32 to gcc calls for aix/ppcClément Chigot1-1/+4
As gcc might now be compiled in 64bit, -maix32 must always be added to ensure that created objects will be 32bit. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/250778
2020-08-07libgo: update to Go1.15rc2 releaseIan Lance Taylor1-1/+3
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247517
2020-08-01libgo: update to go1.15rc1Ian Lance Taylor3-24/+64
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-07-10libgo: update to Go 1.14.4 releaseIan Lance Taylor1-2/+10
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/241999
2020-04-06libgo: update to almost the 1.14.2 releaseIan Lance Taylor1-3/+16
Update to edea4a79e8d7dea2456b688f492c8af33d381dc2 which is likely to be approximately the 1.14.2 release. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227377
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor3-15/+22
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2019-11-19libgo: better cmd/cgo handling for '.' in pkgpathIan Lance Taylor1-1/+3
Updates cgo's gccgoPkgpathToSymbolNew() to bring it into conformance with the way that gccgo now handles package paths with embedded dots (see CL 200838). See also https://gcc.gnu.org/PR61880, a related bug. This CL is a copy of CL 207957 in the main Go repo. Updates golang/go#35623. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/207977 From-SVN: r278470
2019-09-12libgo: update to Go1.13Ian Lance Taylor2-4/+35
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698 From-SVN: r275691
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor4-25/+45
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-03-18libgo: update to Go 1.12.1Ian Lance Taylor3-68/+12
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167749 From-SVN: r269780
2019-02-26libgo: update to Go1.12rc1Ian Lance Taylor3-8/+76
Reviewed-on: https://go-review.googlesource.com/c/162881 From-SVN: r269202
2019-01-18libgo: update to Go1.12beta2Ian Lance Taylor6-335/+693
Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
2018-11-09cmd/cgo: fix typo in gccgo name mangling recipeIan Lance Taylor1-1/+1
The code to implement new-style gccgo name mangling had a recipe that didn't quite match the one in the compiler (incorrect handling for '.'). This showed up as a failure in the gotools cgo test if the directory containing the test run included a "." character. Reviewed-on: https://go-review.googlesource.com/c/147917 From-SVN: r265981
2018-10-25compiler: improve name mangling for packpathsIan Lance Taylor2-6/+107
The current implementation of Gogo::pkgpath_for_symbol was written in a way that allowed two distinct package paths to map to the same symbol, which could cause collisions at link- time or compile-time. Switch to a better mangling scheme to insure that we get a unique packagepath symbol for each package. In the new scheme instead of having separate mangling schemes for identifiers and package paths, the main identifier mangler ("go_encode_id") now handles mangling of both packagepath characters and identifier characters. The new mangling scheme is more intrusive: "foo/bar.Baz" is mangled as "foo..z2fbar.Baz" instead of "foo_bar.Baz". To mitigate this, this patch also adds a demangling capability so that function names returned from runtime.CallersFrames are converted back to their original unmangled form. Changing the pkgpath_for_symbol scheme requires updating a number of //go:linkname directives and C "__asm__" directives to match the new scheme, as well as updating the 'gotest' driver (which makes assumptions about the correct mapping from pkgpath symbol to package name). Fixes golang/go#27534. Reviewed-on: https://go-review.googlesource.com/c/135455 From-SVN: r265510
2018-09-24libgo: update to Go 1.11Ian Lance Taylor7-64/+272
Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546
2018-05-02libgo: add support for the Nios II architectureIan Lance Taylor1-0/+2
Reviewed-on: https://go-review.googlesource.com/90775 From-SVN: r259866
2018-02-22re PR go/84484 (libgo configure tests fail to find -latomic)Andreas Schwab1-0/+2
PR go/84484 libgo: add support for riscv64 Patch by Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/96377 * go.test/go-test.exp (go-set-goarch): Recognize riscv64-*-*. From-SVN: r257914
2018-02-08libgo: update to Go1.10rc2Ian Lance Taylor2-9/+13
Reviewed-on: https://go-review.googlesource.com/92736 From-SVN: r257493
2018-01-27libgo: update to Go1.10rc1Ian Lance Taylor2-73/+58
Reviewed-on: https://go-review.googlesource.com/90295 From-SVN: r257126
2018-01-17libgo: update to Go1.10beta2 releaseIan Lance Taylor3-10/+95
Reviewed-on: https://go-review.googlesource.com/87897 From-SVN: r256794
2018-01-10libgo: add platform support for SuperHIan Lance Taylor1-0/+4
Reviewed-on: https://go-review.googlesource.com/84555 From-SVN: r256446
2018-01-09libgo: update to Go1.10beta1Ian Lance Taylor5-340/+621
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
2017-09-22debug/xcoff,cmd: add XCOFF supportIan Lance Taylor2-2/+98
Reviewed-on: https://go-review.googlesource.com/64592 From-SVN: r253105
2017-09-14libgo: update to go1.9Ian Lance Taylor5-167/+447
Reviewed-on: https://go-review.googlesource.com/63753 From-SVN: r252767
2017-06-21libgo: remove old MIPS architecture namesIan Lance Taylor1-8/+0
This removes the old names for the 3 main MIPS ABIs: mipso32, mipsn32 and mipsn64. It also removes the mipso64 ABI which has no equivalent architecture name in go. This ABI has been dead for sometime and I doubt anyone will miss it. Reviewed-on: https://go-review.googlesource.com/46154 From-SVN: r249477
2017-06-21cmd/cgo: add mips64p32* to ptrSizeMap and intSizeMapIan Lance Taylor1-42/+46
Reviewed-on: https://go-review.googlesource.com/46152 From-SVN: r249475
2017-06-14cmd/cgo: make _cgo_flags consistent across runsIan Lance Taylor2-3/+26
The go tool will pass -I objdir as one of the flags, where objdir is the temporary build directory. Remove that from _cgo_flags: we don't need it, and it will be different each time. Sort the flags to avoid the unpredictable map iteration order. This matters for gccgo because for a package that uses cgo, the go tool when building for gccgo will store the _cgo_flags file in the archive. That means that we want to generate identical _cgo_flags for every run. The test for this is the cmd/go testsuite, to follow in a future CL. Reviewed-on: https://go-review.googlesource.com/45692 From-SVN: r249199
2017-01-14libgo: update to Go 1.8 release candidate 1Ian Lance Taylor5-209/+336
Compiler changes: * Change map assignment to use mapassign and assign value directly. * Change string iteration to use decoderune, faster for ASCII strings. * Change makeslice to take int, and use makeslice64 for larger values. * Add new noverflow field to hmap struct used for maps. Unresolved problems, to be fixed later: * Commented out test in go/types/sizes_test.go that doesn't compile. * Commented out reflect.TestStructOf test for padding after zero-sized field. Reviewed-on: https://go-review.googlesource.com/35231 gotools/: Updates for Go 1.8rc1. * Makefile.am (go_cmd_go_files): Add bug.go. (s-zdefaultcc): Write defaultPkgConfig. * Makefile.in: Rebuild. From-SVN: r244456
2016-07-22libgo: update to go1.7rc3Ian Lance Taylor7-146/+483
Reviewed-on: https://go-review.googlesource.com/25150 From-SVN: r238662
2016-02-03libgo: Update to go1.6rc1.Ian Lance Taylor6-213/+725
Reviewed-on: https://go-review.googlesource.com/19200 From-SVN: r233110
2015-11-20re PR go/68072 (malformed DWARF TagVariable entry)Ian Lance Taylor1-0/+5
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
2015-10-31runtime: Remove now unnecessary pad field from ParFor.Ian Lance Taylor7-458/+417
It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 From-SVN: r229616
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-01-15libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.Ian Lance Taylor4-187/+250
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-06libgo: Add sources for go, cgo, and gofmt commands.Ian Lance Taylor7-0/+4973
The new commands are not yet built. That will be done separately. Also include a few changes to go/build to support them. From-SVN: r219272