Ian, thanks for clearing that up. Will have another look at crosstool-ng. On Tue, Oct 20, 2020 at 9:21 PM Ian Lance Taylor <i...@golang.org> wrote: > > On Tue, Oct 20, 2020 at 8:17 AM Gerrit Binnenmars > <gerritbinnenm...@gmail.com> wrote: > > > > You are correct, what I try is to cross-compile a go application (in this > > case Mender client) for the ppc platform (e500 on a MFC8555 processor). > > 1. I used crosstool-ng instead of buildroot. It has support for "go" as > > experimental language and as result a gccgo compiler is build and also a > > libgo library. > > 2. The mender client is normally build with: go build client_dir what I do > > is: env GOOS=linux GOARCH=ppc go build -compiler gccgo client_dir > > Than go complains as explained that ppc is a not supported architecture. > > Unfortunately the crosstool-ng tooling thus not deliver a new go. I read > > somewhere that recompiling go with a gccgo compiler might solve this. (so > > besides the ppc version of ggcgo I also used crosstool-ng to build an > > x86_64 (amd64) version. > > 3. Interesting approach, I don't completely understand it yet but will > > investigate it further. > > > > Is it possible to use a Makefile approach with gccgo instead of go build? > > There is some misunderstanding here. > > There are two different Go compilers here: gc and gccgo. The gc > compiler does not support 32-bit PPC. There is no way to build the gc > compiler such that it will support 32-bit PPC. The gccgo compiler > does support 32-bit PPC. If you want to build Go programs for 32-bit > PPC, you should build and use the gccgo compiler. You should not be > using the gc compiler at all. When you build gccgo for 32-bit PPC, > you will get a version of the go tool that builds programs for 32-bit > PPC. > > You say that using crosstool-ng does not give you a go tool. That > seems like a bug in crosstool-ng. You could try checking for > something like ppc-linux-gnu-go. > > Ian
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAAjmYBUQYuxJyX32TEDW-na%3D5vTbQ_1uyb09OY3jjL20%3DrY4oQ%40mail.gmail.com.