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

Issue 7433043: code review 7433043: cmd/cgo: extend implementation comment (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by rsc
Modified:
12 years, 4 months ago
Reviewers:
minux1
CC:
iant, golang-dev
Visibility:
Public.

Description

cmd/cgo: extend implementation comment This is the plan for how to make host linking work with the rest of the system. There are two complications: 1. It is a goal to preserve the property that pure Go programs (even ones importing "net") can be compiled without needing gcc, so that a Go toolchain download works out of the box. This forces the support for two linking modes: with and without gcc. 2. It is a goal to allow users with old copies of SWIG to continue to use those copies. This forces the support for "internal only" packages. Perhaps it is reasonable to require a new SWIG. I don't know.

Patch Set 1 #

Patch Set 2 : diff -r 62bf913b4f40 https://go.googlecode.com/hg #

Total comments: 21

Patch Set 3 : diff -r 62bf913b4f40 https://go.googlecode.com/hg #

Total comments: 7

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

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -0 lines) Patch
M src/cmd/cgo/doc.go View 1 2 3 1 chunk +226 lines, -0 lines 1 comment Download

Messages

Total messages: 7
rsc
Hello iant (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
12 years, 4 months ago (2013-02-28 04:59:01 UTC) #1
iant
https://codereview.appspot.com/7433043/diff/2001/src/cmd/cgo/doc.go File src/cmd/cgo/doc.go (right): https://codereview.appspot.com/7433043/diff/2001/src/cmd/cgo/doc.go#newcode437 src/cmd/cgo/doc.go:437: compiled in "internal only", "internal+external", or "external only" modes. ...
12 years, 4 months ago (2013-02-28 05:50:30 UTC) #2
rsc
Hello iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 4 months ago (2013-02-28 14:34:08 UTC) #3
iant
LGTM https://codereview.appspot.com/7433043/diff/8001/src/cmd/cgo/doc.go File src/cmd/cgo/doc.go (right): https://codereview.appspot.com/7433043/diff/8001/src/cmd/cgo/doc.go#newcode416 src/cmd/cgo/doc.go:416: command) then invokes the host linker (usually gcc) ...
12 years, 4 months ago (2013-02-28 17:06:11 UTC) #4
rsc
Thanks. https://codereview.appspot.com/7433043/diff/2001/src/cmd/cgo/doc.go File src/cmd/cgo/doc.go (right): https://codereview.appspot.com/7433043/diff/2001/src/cmd/cgo/doc.go#newcode437 src/cmd/cgo/doc.go:437: compiled in "internal only", "internal+external", or "external only" ...
12 years, 4 months ago (2013-02-28 18:42:39 UTC) #5
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=1a9cccfde340 *** cmd/cgo: extend implementation comment This is the plan for how ...
12 years, 4 months ago (2013-02-28 18:44:34 UTC) #6
minux1
12 years, 4 months ago (2013-02-28 19:02:05 UTC) #7
Message was sent while issue was closed.
https://codereview.appspot.com/7433043/diff/14001/src/cmd/cgo/doc.go
File src/cmd/cgo/doc.go (right):

https://codereview.appspot.com/7433043/diff/14001/src/cmd/cgo/doc.go#newcode480
src/cmd/cgo/doc.go:480: in the final binary. This directive is only needed from
one
i think allowing it to appear more than one could help
diagnosing problems where runtime/cgo is compiled on
another system with a different dynlinker than the current
system.

the linker will raise error for this case and so it won't
generate a binary that is not runnable on the current system.
(running a binary with wrong interpreter used to cause very
confusing error messages on some systems)

note that even on linux, the elf interpreter might be different
for different distributions and/or versions (and that's why this
pragma is introduced).
Sign in to reply to this message.

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