Open perillo opened 3 years ago
This is the change for golang.org/x/sys
: https://golang.org/cl/270317.
The additional architectures in cmd/cgo and the build tags in golang.org/x/sys are supported by gccgo, and they are used when the package is built by gccgo. So I don't think that anything is actually broken.
But it would be better if all the architectures were reflected in all of those locations.
The problem is that, as far as I can understand, a tag like nios2
will simply be ignored by go build
, since it is not a know GOARCH.
gccgo has its own copy of the go command.
There are currently 3 places where supported architectures are enumerated:
The problem is that the list in cmd/cgo/main.go is out of sync with the other lists.
From cmd/cgo/main.go:
From cmd/go/internal/imports/build.go:
cgo
havealpha
,m68k
nios2
sh
andshbe
, and is missingamd64p32
,mips64p32
andmips64p32le
. I don't know if there is a reason for the difference, but the problem is that the additional architectures known tocgo
are used as a build tag incmd/vendor/golang.org/x/sys/unix
(inendian_big.go
andendian_big.go
), and since they are not known bygo
, they are probably ignored.Another small issues is that the architecture list in
cmd/go/internal/imports/build.go
is not sorted correctly.I'm not sure if this should be reported as an issue about
cmd/cgo
or aboutgolang.org/x/sys/unix
. Probably this is harmless.