Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(92)

Issue 5645093: code review 5645093: cmd/dist: cross-compiling fixes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by rsc
Modified:
13 years, 1 month ago
Reviewers:
CC:
golang-dev, r
Visibility:
Public.

Description

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 issue 2920.

Patch Set 1 #

Patch Set 2 : diff -r 4a0c77722a5e https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 4a0c77722a5e https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r e82fb8e5b5c8 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 5 : diff -r aa8737f1a31b https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -104 lines) Patch
M src/all.bash View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/cmd/dist/a.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/dist/build.c View 1 2 3 4 24 chunks +135 lines, -59 lines 0 comments Download
M src/cmd/dist/buildruntime.c View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/dist/goc2c.c View 1 2 3 1 chunk +15 lines, -7 lines 0 comments Download
M src/cmd/dist/unix.c View 1 2 3 4 chunks +7 lines, -0 lines 0 comments Download
M src/cmd/go/build.go View 1 2 3 2 chunks +19 lines, -8 lines 0 comments Download
M src/cmd/go/pkg.go View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M src/cmd/go/tool.go View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M src/make.bash View 1 2 3 1 chunk +20 lines, -8 lines 0 comments Download
M src/make.bat View 1 2 3 1 chunk +29 lines, -7 lines 0 comments Download
M src/pkg/exp/types/gcimporter_test.go View 1 2 3 3 chunks +10 lines, -1 line 0 comments Download
M src/pkg/go/build/path.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/run.bash View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M test/fixedbugs/bug302.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M test/run View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-02-14 01:16:01 UTC) #1
r
i don't have a good countersuggestion but it bothers me that the goos_goarch convention has ...
13 years, 1 month ago (2012-02-14 01:48:50 UTC) #2
r
LGTM http://codereview.appspot.com/5645093/diff/8001/src/cmd/dist/build.c File src/cmd/dist/build.c (right): http://codereview.appspot.com/5645093/diff/8001/src/cmd/dist/build.c#newcode106 src/cmd/dist/build.c:106: if((i=find(gohostarch, okgoarch, nelem(okgoarch))) < 0) split into two ...
13 years, 1 month ago (2012-02-14 01:53:03 UTC) #3
rsc
13 years, 1 month ago (2012-02-14 03:31:54 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=6c0e4bc626ee ***

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 issue 2920.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/5645093
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b