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

Issue 1700048: code review 1700048: cgo: use slash-free relative paths for .so references (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 11 months ago by rsc
Modified:
14 years, 10 months ago
Reviewers:
CC:
iant, r, golang-dev
Visibility:
Public.

Description

cgo: use slash-free relative paths for .so references The Makefile and cgo now rewrite / to _ when creating the path. The .so for gosqlite.googlecode.com/hg/sqlite is named cgo_gosqlite.googlecode.com_hg_sqlite.so, and then 6l and 8l both include a default rpath of $GOROOT/pkg/$GOOS_$GOARCH. This should make it easier to move binaries from one system to another. Fixes issue 857.

Patch Set 1 #

Patch Set 2 : code review 1700048: cgo: use slash-free relative paths for .so references #

Patch Set 3 : code review 1700048: cgo: use slash-free relative paths for .so references #

Patch Set 4 : code review 1700048: cgo: use slash-free relative paths for .so references #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -10 lines) Patch
M src/Make.pkg View 2 chunks +3 lines, -2 lines 0 comments Download
M src/cmd/5l/obj.c View 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/6l/obj.c View 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/8l/obj.c View 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/cgo/out.go View 1 2 3 5 chunks +24 lines, -8 lines 0 comments Download
M src/cmd/ld/macho.c View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 11 months ago (2010-07-01 03:02:26 UTC) #1
r2
LGTM but i can't speak authoritatively for macho.c -rob
14 years, 11 months ago (2010-07-01 03:20:13 UTC) #2
iant
LGTM What about src/cmd/5l/obj.c, though?
14 years, 10 months ago (2010-07-01 06:11:42 UTC) #3
rsc
added, thanks for the reminder. i didn't think 5l knew about dynamic libraries. On Wed, ...
14 years, 10 months ago (2010-07-01 06:29:24 UTC) #4
rsc
14 years, 10 months ago (2010-07-01 06:31:29 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=f04a16455355 ***

cgo: use slash-free relative paths for .so references

The Makefile and cgo now rewrite / to _ when creating the path.
The .so for gosqlite.googlecode.com/hg/sqlite is named
cgo_gosqlite.googlecode.com_hg_sqlite.so, and then 6l and 8l
both include a default rpath of $GOROOT/pkg/$GOOS_$GOARCH.
This should make it easier to move binaries from one system
to another.

Fixes issue 857.

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

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