cmd/go: easier cross compilation #10049

Closed
davecheney opened this Issue Mar 2, 2015 · 2 comments

Projects

None yet

4 participants

@davecheney
Contributor

Currently cross compilation requires the user to build their native toolchain (all.bash) then rebuild their toolchain (env GOOS=... GOARCH=... make.bash --no-clean).

This is problematic for a number of reasons, most notably, we guide people towards the binary releases of Go which prevent this recompilation step because the binary releases are not owned by the user.

With the advent of the rewrite of the compilers, users of 1.5 will have all the compilers as part of the binary installer. The only remaining issue is they will not have copies of textflag.h and funcdata.h in $GOROOT/pkg/$GOOS_$GOARCH.

It turns out that the contents of these two files do not change from architecture to architecture so as long as one copy of them exists in $GOROOT, all targets can reference them.

@davecheney davecheney added this to the Go1.5 milestone Mar 2, 2015
@minux
Member
minux commented Mar 2, 2015

SGTM.

@robpike
Contributor
robpike commented Mar 2, 2015

SGTM

@rsc rsc added a commit that closed this issue Mar 2, 2015
@rsc rsc cmd/dist, cmd/go: move textdata.h, funcdata.h from pkg/GOOS_GOARCH to…
… pkg/include

There's no point to having them in every GOOS_GOARCH directory,
since they are neither GOOS- nor GOARCH-specific.
(There used to be other headers that were.)

This makes building for additional toolchains easier:
no need to run make.bash at all.

Fixes #10049.

Change-Id: I710ecaafd7a5c8cad85ccd595ea9cb6058f553b3
Reviewed-on: https://go-review.googlesource.com/6471
Reviewed-by: Rob Pike <r@golang.org>
190357d
@rsc rsc closed this in 190357d Mar 2, 2015
@gopherbot gopherbot locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.