-
Notifications
You must be signed in to change notification settings - Fork 18.1k
dist: add binary download for cross compilation #6597
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
Labels
Milestone
Comments
we probably should consider the impact of not support cgo. (a particular annoying problem is os/user.Current doesn't work without cgo on unix) also, i suggest we add distributions for arm cross toolchains too. i have an idea: 1. we make misc/dist build all part of toolchain for all distribution tarballs (e.g. windows/amd64 tarball should contain 5g, 5c, 8g, 8c, etc) 2. we release an additional cross compilation tarball that contains compiled pkgs for all supported platforms. so that people can download that and properly extract into there $GOROOT/pkg and immediately get cross compilation capabilities without ever compiling the Go source code. as a refinement to 2, we can divide that into cross compliation "addon" for different OSes, e.g. windows.zip contains pkg/windows_amd64 and pkg/windows_386 linux.zip contains pkg/linux_amd64, pkg/linux_386, and pkg/linux_arm, etc. in this way we don't need to provide O(N^2) (N is supported platforms) tarballs to support every case, and yet we add full (non-cgo) cross compilation support for binary distribution users. |
Re #7, for os/user and net on platforms with binary distribution, there is a way to cross compile packages using those packages without setting up a gcc/clang cross-compiler. for example, see gonative: https://inconshreveable.com/04-30-2014/cross-compiling-golang-programs-with-native-libraries/ |
Is this still relevant, now that Go cross compilation works without having to do anything special? |
Probably not relevant. Most of this bug has been discussing Closing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: