summaryrefslogtreecommitdiff
path: root/src/cmd/6l/obj.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-06-30 23:31:27 -0700
committerRuss Cox <rsc@golang.org>2010-06-30 23:31:27 -0700
commit94a61eaf452acf5b9ac7fd24e5b1ac16bf03cc48 (patch)
treec0c2aab135ee32235cc1e035a8e6ff1298c1bb6f /src/cmd/6l/obj.c
parentdbdbfcf74725a012a6b111697f31db87bc3d392a (diff)
downloadgolang-94a61eaf452acf5b9ac7fd24e5b1ac16bf03cc48.tar.gz
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
Diffstat (limited to 'src/cmd/6l/obj.c')
-rw-r--r--src/cmd/6l/obj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c
index 6a0d49f13..5a4b6a3fc 100644
--- a/src/cmd/6l/obj.c
+++ b/src/cmd/6l/obj.c
@@ -138,6 +138,8 @@ main(int argc, char *argv[])
usage();
libinit();
+ if(rpath == nil)
+ rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
if(HEADTYPE == -1) {
HEADTYPE = 2;