x/sys/unix: Does not build on mipsel/mips64el/alpha/powerpc with gccgo #18031
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
The text was updated successfully, but these errors were encountered:
@TheTincho: Thank you for bringing up this issue and for pioneering the solution for mips64le, which can be found in https://anonscm.debian.org/cgit/pkg-go/packages/golang-golang-x-sys.git/commit/?id=f11a3adc214152ad98e27e7896b697cfcc376959
For probably more than I year, I had been scratching my head over this, namely, Hugo failing to build on MIPS and Alpha (etc.) architectures on Debian buildd (see https://buildd.debian.org/status/package.php?p=hugo&suite=sid). Your solution opened my eyes!
A few things happened since you visited the issue in November 2016:
And it turns out that gccgo reports the same GOARCH of
Anyhow, expanding on @TheTincho's idea, I came up with something like this:
to make sure gccgo can see these files, and then run gccgo (e.g.
For completeness, here is what I have actually used in debian/rules for the golang-golang-x-sys package: https://anonscm.debian.org/cgit/pkg-go/packages/golang-golang-x-sys.git/commit/?id=bb8f8e16490ce03ce084c8e170ea4c9e79f53ba2
I do wonder though:
My apologies if these questions sound silly, or have been answered elsewhere before.
For golang/go#18031 For golang/go#37443 Change-Id: I49dabb362592bb61532a0c4f193919c3f2036af3 Reviewed-on: https://go-review.googlesource.com/c/sys/+/270317 Trust: Tobias Klauser <email@example.com> Run-TryBot: Tobias Klauser <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org>
Add system call definitions for 32-bit PowerPC (ppc). These are expected to be used with gccgo, as gc does not have a suitable code generator. These definitions are largely copied from ppc64x, with some 32-bit specific wrappers copied from arm. The glibc definitions of epoll_event and sockaddr_un structures need to be overridden on ppc, similarly to some other architectures. For golang/go#18031 Fixes golang/go#37443 Change-Id: I061ac2b8fa452dd37c2239a0b09dff2f3e9d50da GitHub-Last-Rev: aada37a GitHub-Pull-Request: #106 Reviewed-on: https://go-review.googlesource.com/c/sys/+/312349 Reviewed-by: Tobias Klauser <email@example.com> Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org> Run-TryBot: Tobias Klauser <email@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org>