$ go tool cgo -godefs types.go unknown ptrSize for $GOARCH "arm64" with a separately built go tool (1.2), built using gccgo-4.9, this works as expected. filing this as a regression for now. $ cat types.go // +build ignore package pty import "C" type ( _C_int C.int _C_uint C.uint ) $ go tool cgo -godefs types.go // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types.go package pty type ( _C_int int32 _C_uint uint32 )
patch by Michael Hudson posted at https://launchpad.net/bugs/1361946 --- a/libgo/go/cmd/cgo/main.go +++ b/libgo/go/cmd/cgo/main.go @@ -133,6 +133,7 @@ "386": 4, "amd64": 8, "arm": 4, + "arm64": 8, "ppc64": 8, "ppc64le": 8, "s390x": 8, @@ -142,6 +143,7 @@ "386": 4, "amd64": 8, "arm": 4, + "arm64": 8, "ppc64": 8, "ppc64le": 8, "s390x": 8,
(In reply to Matthias Klose from comment #1) > patch by Michael Hudson posted at https://launchpad.net/bugs/1361946 > > --- a/libgo/go/cmd/cgo/main.go > +++ b/libgo/go/cmd/cgo/main.go > @@ -133,6 +133,7 @@ > "386": 4, > "amd64": 8, > "arm": 4, > + "arm64": 8, > "ppc64": 8, > "ppc64le": 8, > "s390x": 8, > @@ -142,6 +143,7 @@ > "386": 4, > "amd64": 8, > "arm": 4, > + "arm64": 8, > "ppc64": 8, > "ppc64le": 8, > "s390x": 8, Except hat is broken for ilp32.
ilp32 will need to be a new GOARCH; "arm64p32" would fit with the existing GOARCH value of amd64p32 for intel.
Author: ian Date: Tue Mar 10 00:14:58 2015 New Revision: 221293 URL: https://gcc.gnu.org/viewcvs?rev=221293&root=gcc&view=rev Log: PR go/65353. cmd/cgo: Add all gccgo GOARCH values to size maps. Modified: trunk/libgo/go/cmd/cgo/main.go
Should be fixed. Thanks for reporting it.