[pkg-golang-devel] Bug#815998: golang: add mips64/mips64el support

Mathieu Malaterre malat at debian.org
Tue Aug 30 06:31:25 UTC 2016


On Sun, Aug 28, 2016 at 5:12 PM, Tianon Gravi <tianon at debian.org> wrote:
> Given that upstream officially supports bootstrapping via gccgo, I'd
> rather keep the discussion of "fix cross build" to a separate issue if
> we can.  I am interested in updating the packaging to properly support
> cross-building, but consider it a secondary concern to adding more
> architectures.
>
> That being said, I attempted to build src:golang-1.7 on mips64el and
> ran into the following build failure:
>
> (sid_mips64el-dchroot)tianon at eller:~/golang-1.7-1.7$ dpkg-buildpackage -uc -us
> dpkg-buildpackage: info: source package golang-1.7
> dpkg-buildpackage: info: source version 1.7-3
> dpkg-buildpackage: info: source distribution unstable
> dpkg-buildpackage: info: source changed by Tianon Gravi <tianon at debian.org>
> dpkg-buildpackage: info: host architecture mips64el
>  dpkg-source --before-build golang-1.7-1.7
>  fakeroot debian/rules clean
[...]

> export GOROOT_BOOTSTRAP=$(env -i go env GOROOT) \
> && cd src \
> && /home/tianon/golang-1.7-1.7/debian/helpers/goenv.sh \

Well you need to update that file I guess:

$ head -20 debian/helpers/goenv.sh
#!/bin/sh
set -e

__goos__deb_arch_os() {
case "$1" in
kfreebsd) echo freebsd ;;
linux) echo "$1" ;;
*) echo >&2 "error: unrecongized DEB_*_ARCH_OS: $1"; exit 1 ;;
esac
}

__goarch__deb_arch_cpu() {
case "$1" in
amd64|arm|arm64|ppc64|s390x) echo "$1" ;;
i386) echo 386 ;;
ppc64el) echo ppc64le ;;
mips64el) echo mips64le ;;
*) echo >&2 "error: unrecongized DEB_*_ARCH_CPU: $1"; exit 1 ;;
esac
}

Good luck!



More information about the pkg-golang-devel mailing list