Re: Bug#815998: golang: add mips64/mips64el support

YunQiang Su <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <CAKcpw6VWpjZtLu+TJgRDgfNJ+Fxz2nG2Trp2EC7m4Bc7j0Khnw@mail.gmail.com>
On Tue, Aug 30, 2016 at 2:37 PM, Mathieu Malaterre <[email protected]> wrote:
> On Tue, Aug 30, 2016 at 8:31 AM, Mathieu Malaterre <[email protected]> wrote:
>> On Sun, Aug 28, 2016 at 5:12 PM, Tianon Gravi <[email protected]> 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@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 <[email protected]>
>>> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.