Go for PowerPC? If not, how to build Go's packages with cross-compiler GCCGO?

458 views
Skip to first unread message

James Huang

unread,
Apr 8, 2015, 1:24:56 PM4/8/15
to golan...@googlegroups.com
This is really my first post. I searched the net, and it seems to me that there is no official support for PowerPC yet.

So I managed to build GCCGO (GCC 4.8.4) that runs on linux-amd64 and targets linux-powerpc, and intended to use GCCGO whenever I need to use GC. I had libgo.so as well. I built a simple program with my GCCGO that could then run on linux-powerpc successfully.

However, I needed to build the packages that come with Go. Go's build script "make.bash" uses cmd/dist and go_bootstrap and so on. I then built cmd/dist for powerpc. But it seems that I needed to modify its source code to support "linux.powerpc" and such. There seems to be a long journey ahead, and I really do not know if that is the right direction.l.. So I am here to ask if anyone tried similar things and would like to shed me some light.

Thanks in advance.

James

Daniel Theophanes

unread,
Apr 8, 2015, 1:40:39 PM4/8/15
to golan...@googlegroups.com
Go 1.5 will support ppc 64-bit.  Support is in tip right now, once  you get tip and can compile (have a reference 1.4 build ready), cross compile to ppc, or wait for 1.5 to officially come out.

-Daniel

Ian Lance Taylor

unread,
Apr 8, 2015, 3:07:51 PM4/8/15
to James Huang, golang-nuts
On Wed, Apr 8, 2015 at 10:24 AM, James Huang <huang...@gmail.com> wrote:
>
> So I managed to build GCCGO (GCC 4.8.4) that runs on linux-amd64 and targets
> linux-powerpc, and intended to use GCCGO whenever I need to use GC. I had
> libgo.so as well. I built a simple program with my GCCGO that could then run
> on linux-powerpc successfully.
>
> However, I needed to build the packages that come with Go. Go's build script
> "make.bash" uses cmd/dist and go_bootstrap and so on. I then built cmd/dist
> for powerpc. But it seems that I needed to modify its source code to support
> "linux.powerpc" and such. There seems to be a long journey ahead, and I
> really do not know if that is the right direction.l.. So I am here to ask if
> anyone tried similar things and would like to shed me some light.

1) Go 1.5 will support PPC64.

2) When you build gccgo, it comes with a complete copy of the Go
standard library. There is no reason to build gccgo and then run
cmd/dist or make.bash. You can just use gccgo.

Ian
Reply all
Reply to author
Forward
0 new messages