New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: Problems with cross-compiling gccgo - go tool is in target and not in source format #10310
Comments
The go tool is not inherently target-specific. You will have to build a version of the go tool for your build system, and use that go tool with your cross-compiler. For example, you can set the GCCGO environment variable to tell the go tool which compiler to use when building. Building the go tool as part of gccgo is quite new, and it is likely that you will run into trouble. Please report specific problems that you discover as specific issues. Thanks. |
Thank you for reply :) I compiled "go" for the buildhost and it works fine. I created "gocross.env" script which sets all required variables:
And everything works as expected. It should be fine to document this somewhere, i will probably do a blog post about cross compiling with gccgo. |
Please, please, blog about this.
|
Hi.
I am trying to build go cross compilation toolchain for the powerpcspe arch. I am using snapshot of GCC5 and crosstool-ng. GCCGO builds and run just fine, but "go" command is built for the target arch, so i cant use it on the build host. Here is an example, correct arch, g++:
Correct arch, gccgo:
Wrong arch, go tool:
Because of this limitation i am unable to compile anything for the target platform if "go" is required. What do i need to get "go" tool in native format usable for crosscompilation?
The text was updated successfully, but these errors were encountered: