summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-01-30 10:30:46 -0800
committerRob Pike <r@golang.org>2012-01-30 10:30:46 -0800
commitff8133d42e19d22fc0f1a4dc05f587e135f51ce7 (patch)
tree275ab90db0e60c1061362da5d61c55bb0ea093fa /src/cmd
parentcb34f5c357d0f52f57825bf7d3f4215ae8ef3f04 (diff)
downloadgo-git-ff8133d42e19d22fc0f1a4dc05f587e135f51ce7.tar.gz
gopack: rename pack, move to go-tool directory
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5598045
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/Makefile2
-rw-r--r--src/cmd/go/build.go5
-rw-r--r--src/cmd/pack/Makefile (renamed from src/cmd/gopack/Makefile)4
-rw-r--r--src/cmd/pack/ar.c (renamed from src/cmd/gopack/ar.c)0
-rw-r--r--src/cmd/pack/doc.go (renamed from src/cmd/gopack/doc.go)10
5 files changed, 9 insertions, 12 deletions
diff --git a/src/cmd/Makefile b/src/cmd/Makefile
index 2ee585a0f4..dca9f82011 100644
--- a/src/cmd/Makefile
+++ b/src/cmd/Makefile
@@ -16,8 +16,8 @@ DIRS=\
cc\
cov\
gc\
- gopack\
nm\
+ pack\
prof\
# Clean applies to all directories, even for other architectures or
diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go
index 659e5fce97..c4bef14e54 100644
--- a/src/cmd/go/build.go
+++ b/src/cmd/go/build.go
@@ -997,7 +997,7 @@ func (goToolchain) pack(b *builder, p *Package, objDir, afile string, ofiles []s
for _, f := range ofiles {
absOfiles = append(absOfiles, mkAbs(objDir, f))
}
- return b.run(p.Dir, p.ImportPath, "gopack", "grc", mkAbs(objDir, afile), absOfiles)
+ return b.run(p.Dir, p.ImportPath, filepath.Join(b.goroot, "bin/go-tool/pack"), "grc", mkAbs(objDir, afile), absOfiles)
}
func (goToolchain) ld(b *builder, p *Package, out string, allactions []*action, mainpkg string, ofiles []string) error {
@@ -1146,9 +1146,6 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
}
}
- // Allows including _cgo_export.h from .[ch] files in the package.
- cgoCFLAGS = append(cgoCFLAGS, "-I", obj)
-
// cgo
// TODO: CGOPKGPATH, CGO_FLAGS?
gofiles := []string{obj + "_cgo_gotypes.go"}
diff --git a/src/cmd/gopack/Makefile b/src/cmd/pack/Makefile
index 91a8ac2df2..12909727fc 100644
--- a/src/cmd/gopack/Makefile
+++ b/src/cmd/pack/Makefile
@@ -5,8 +5,8 @@
include ../../Make.inc
O:=$(HOST_O)
-TARG=gopack
+TARG=pack
OFILES=\
ar.$O\
-include ../../Make.ccmd
+include ../../Make.ctool
diff --git a/src/cmd/gopack/ar.c b/src/cmd/pack/ar.c
index 40c99f6c7c..40c99f6c7c 100644
--- a/src/cmd/gopack/ar.c
+++ b/src/cmd/pack/ar.c
diff --git a/src/cmd/gopack/doc.go b/src/cmd/pack/doc.go
index 1551a275fd..6cbc357db9 100644
--- a/src/cmd/gopack/doc.go
+++ b/src/cmd/pack/doc.go
@@ -4,7 +4,7 @@
/*
-Gopack is a variant of the Plan 9 ar tool. The original is documented at
+Pack is a variant of the Plan 9 ar tool. The original is documented at
http://plan9.bell-labs.com/magic/man2html/1/ar
@@ -12,14 +12,14 @@ It adds a special Go-specific section __.PKGDEF that collects all the
Go type information from the files in the archive; that section is
used by the compiler when importing the package during compilation.
-Usage: gopack [uvnbailogS][mrxtdpq][P prefix] archive files ...
+Usage: go tool pack [uvnbailogS][mrxtdpq][P prefix] archive files ...
-The new option 'g' causes gopack to maintain the __.PKGDEF section
+The new option 'g' causes pack to maintain the __.PKGDEF section
as files are added to the archive.
-The new option 'S' forces gopack to mark the archive as safe.
+The new option 'S' forces pack to mark the archive as safe.
-The new option 'P' causes gopack to remove the given prefix
+The new option 'P' causes pack to remove the given prefix
from file names in the line number information in object files
that are already stored in or added to the archive.
*/