]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: cross-compiling fixes
authorRuss Cox <rsc@golang.org>
Tue, 14 Feb 2012 03:31:51 +0000 (22:31 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 14 Feb 2012 03:31:51 +0000 (22:31 -0500)
commit7b848c69647c52d69127ccef79cc7d01c0ec02c6
treeabad1d70e9aced9f6cd2804868e80f19bba8365c
parent569ef7d49e36048aeca92e387e934d5a53276949
cmd/dist: cross-compiling fixes

This CL makes it possible to run make.bash with
GOOS and GOARCH set to something other than
the native host GOOS and GOARCH.

As part of the CL, the tool directory moves from bin/tool/
to pkg/tool/goos_goarch where goos and goarch are
the values for the host system (running the build), not
the target.  pkg/ is not technically appropriate, but C objects
are there now tool (pkg/obj/) so this puts all the generated
binaries in one place (rm -rf $GOROOT/pkg cleans everything).
Including goos_goarch in the name allows different systems
to share a single $GOROOT on a shared file system.

Fixes #2920.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645093
16 files changed:
src/all.bash
src/cmd/dist/a.h
src/cmd/dist/build.c
src/cmd/dist/buildruntime.c
src/cmd/dist/goc2c.c
src/cmd/dist/unix.c
src/cmd/go/build.go
src/cmd/go/pkg.go
src/cmd/go/tool.go
src/make.bash
src/make.bat
src/pkg/exp/types/gcimporter_test.go
src/pkg/go/build/path.go
src/run.bash
test/fixedbugs/bug302.go
test/run