Commit ff8133d4 authored by Rob Pike's avatar Rob Pike

gopack: rename pack, move to go-tool directory

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5598045
parent cb34f5c3
......@@ -41,7 +41,7 @@ testpackage-clean:
_test/main.a: _gotest_.$O
@mkdir -p _test
rm -f $@
gopack grc $@ _gotest_.$O
"$(GOROOT)/bin/go-tool/pack" grc $@ _gotest_.$O
_gotest_.$O: $(GOFILES) $(GOTESTFILES)
$(GC) $(GCFLAGS) $(GCIMPORTS) -o $@ $(GOFILES) $(GOTESTFILES)
......
......@@ -91,12 +91,12 @@ _gotest_.$O: $(GOFILES) $(GOTESTFILES) $(PREREQ)
_obj/$(TARG).a: _go_.$O $(OFILES)
@mkdir -p _obj/$(dir)
rm -f _obj/$(TARG).a
gopack grc $@ _go_.$O $(OFILES)
"$(GOROOT)/bin/go-tool/pack" grc $@ _go_.$O $(OFILES)
_test/$(TARG).a: _gotest_.$O $(OFILES)
@mkdir -p _test/$(dir)
rm -f _test/$(TARG).a
gopack grc $@ _gotest_.$O $(OFILES)
"$(GOROOT)/bin/go-tool/pack" grc $@ _gotest_.$O $(OFILES)
importpath:
@echo $(TARG)
......
......@@ -40,7 +40,7 @@ testpackage-clean:
_test/main.a: _gotest_.$O
@mkdir -p _test
rm -f $@
gopack grc $@ _gotest_.$O
"$(GOROOT)/bin/go-tool/pack" grc $@ _gotest_.$O
_gotest_.$O: $(GOFILES) $(GOTESTFILES)
$(GC) $(GCFLAGS) $(GCIMPORTS) -o $@ $(GOFILES) $(GOTESTFILES)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -16,8 +16,8 @@ DIRS=\
cc\
cov\
gc\
gopack\
nm\
pack\
prof\
# Clean applies to all directories, even for other architectures or
......
......@@ -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"}
......
......@@ -5,8 +5,8 @@
include ../../Make.inc
O:=$(HOST_O)
TARG=gopack
TARG=pack
OFILES=\
ar.$O\
include ../../Make.ccmd
include ../../Make.ctool
......@@ -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.
*/
......
// $G $D/bug302.dir/p.go && gopack grc pp.a p.$A && $G $D/bug302.dir/main.go
// $G $D/bug302.dir/p.go && "$GOROOT"/bin/go-tool/pack grc pp.a p.$A && $G $D/bug302.dir/main.go
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment