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

YunQiang Su wzssyqa at gmail.com
Tue Aug 30 08:31:34 UTC 2016


On Tue, Aug 30, 2016 at 2:37 PM, Mathieu Malaterre <malat at debian.org> wrote:
> On Tue, Aug 30, 2016 at 8:31 AM, Mathieu Malaterre <malat at debian.org> wrote:
>> 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!
>
> I guess I was not clear, I meant specifically this line:
>
> export GO386=387

Even with this option, bootstrap with golang can still works.
And I tried to unset GO386 for mips64el, the same problem still happens.

I guess it is a bug of gccgo for mips64el.
So, for now, I think that you can add mips64 and mips64el into
architecture list,
and I can build golang-1.7 with manually bootstrapped golang.

Even with this option, bootstrap with golang can still works.
And I tried to unset GO386 for mips64el, the same problem still happens.

I guess it is a bug of gccgo for mips64el.
So, for now, I think that you can add mips64 and mips64el into
architecture list,
and I can build golang-1.7 with manually bootstrapped golang.

>
> There should a sentinel around this.
> 2cts



-- 
YunQiang Su



More information about the pkg-golang-devel mailing list