Skip to content
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/dist: use GOHOSTARCH/GOHOSTOS instead of GOOS/GOARCH for host libraries and binaries #6559

Closed
rsc opened this issue Oct 10, 2013 · 6 comments
Closed
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Oct 10, 2013

If you are, say, on a Mac, and you 

cd src/pkg/runtime
GOOS=linux make

then cmd/dist correctly builds the linux copy of runtime.a.

However, if you 

cd src/cmd/6l
GOOS=linux make

then cmd/dist incorrectly tries to build a "linux" copy of 6l (and fails,
beacuse the "linux" copies of the libraries don't exist). It should be
building the darwin copy, because GOHOSTOS is darwin.

The make.bash sequence sets GOHOSTOS=GOOS and GOHOSTARCH=GOARCH during the builds in
those directories, so it hasn't come up in that context. However, if you are working on
a cross-compiled system it's annoying that you can't leave GOOS set to the target
system. Every time you build a host tool you need to set it back.
@rsc
Copy link
Contributor Author

@rsc rsc commented Dec 4, 2013

Comment 1:

Labels changed: added release-go1.3.

@rsc
Copy link
Contributor Author

@rsc rsc commented Dec 4, 2013

Comment 2:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor Author

@rsc rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-main.

@rsc
Copy link
Contributor Author

@rsc rsc commented Apr 3, 2014

Comment 4:

Possible fix at https://golang.org/cl/81330045/
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 9, 2014

Comment 5:

CL https://golang.org/cl/81330045 references this issue.
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 15, 2014

Comment 6:

This issue was closed by revision d826b2e.

Status changed to Fixed.

@rsc rsc added fixed labels Apr 15, 2014
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.