summaryrefslogtreecommitdiff
path: root/src/Make.pkg
Commit message (Collapse)AuthorAgeFilesLines
* build: remove Make.pkg, Make.toolRuss Cox2012-01-301-244/+0
| | | | | | | | | | | | | | | Consequently, remove many package Makefiles, and shorten the few that remain. gomake becomes 'go tool make'. Turn off test phases of run.bash that do not work, flagged with $BROKEN. Future CLs will restore these, but this seemed like a big enough CL already. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5601057
* go: move compilers into the go-tool directoryRob Pike2012-01-301-9/+4
| | | | | | | | | | | | Also delete gotest, since it's messy to fix and slated for deletion anyway. A couple of things outside src can't be tested any more. "go test" will be fixed and these tests will be re-enabled. They're noisy for now. Fixes issue 284. R=rsc CC=golang-dev http://codereview.appspot.com/5598049
* gopack: rename pack, move to go-tool directoryRob Pike2012-01-301-2/+2
| | | | | | R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/5598045
* fix buildRuss Cox2012-01-121-2/+2
| | | | | | TBR=gri CC=golang-dev http://codereview.appspot.com/5528090
* testing: use flag.Duration for -timeout flag.David Symonds2011-12-251-1/+1
| | | | | | R=golang-dev, gustavo, r CC=golang-dev http://codereview.appspot.com/5498077
* runtime: separate out auto-generated files, take 2Russ Cox2011-12-191-1/+1
| | | | | | | | | | This is like the ill-fated CL 5493063 except that I have written a shell script (autogen.sh) instead of thinking I could possibly write a correct Makefile. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5496075
* runtime: hg revert -r 6ec0a5c12d75Russ Cox2011-12-161-1/+1
| | | | | | | | | | | | | That was the last build that was close to working. I will try that change again next week. Make is being very subtle today. At the reverted-to CL, the ARM traceback appears to be broken. I'll look into that next week too. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5492063
* runtime: separate out auto-generated filesRuss Cox2011-12-161-1/+1
| | | | | | R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/5493063
* runtime: fix buildRuss Cox2011-12-161-1/+1
| | | | | | TBR=r CC=golang-dev http://codereview.appspot.com/5493061
* cgo: add support for callbacks from dynamic librariesDmitriy Vyukov2011-11-221-1/+1
| | | | | | R=golang-dev, rsc CC=golang-dev, mpimenov http://codereview.appspot.com/5375042
* build: pass $GCFLAGS to compilerRuss Cox2011-10-181-2/+2
| | | | | | | | | | | | | | | | | | For example, if you are debugging an optimization problem you can now run GCFLAGS=-N gotest This is a convention for make, not for the general build, so it may go away or be done differently in the eventual 'go' command. The plan is that people will be able to test their code for rune safety by doing GCFLAGS=-r. R=golang-dev, bradfitz, lvd CC=golang-dev http://codereview.appspot.com/5294042
* gc: add -p flag to catch import cycles earlierRuss Cox2011-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | The linker would catch them if gc succeeded, but too often the cycle manifests as making the current package and the imported copy of itself appear as different packages, which result in type signature mismatches that confuse users. As a crutch, add the -p flag to say 'if you see an import of this package, give up early'. Results in messages like (during gotest in sort): export_test.go:7: import "sort" while compiling that package (import cycle) export_test.go:7: import "container/heap": package depends on "sort" (import cycle) Fixes issue 2042. R=ken CC=bradfitz, dsymonds, golang-dev http://codereview.appspot.com/4972057
* build: remove rm dregRuss Cox2011-07-261-1/+1
| | | | | | | | | | | | Undo CL 4254056 now that enough time has elapsed that people with old trees have all built and removed those files (which are no longer generated in that location). Fixes issue 1581. R=golang-dev, bradfitz CC=golang-dev http://codereview.appspot.com/4802059
* src: Make.pkg don't create $(TARGDIR) with goinstall.Yasuhiro Matsumoto2011-05-301-2/+2
| | | | | | | | R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/4548071 Committer: Andrew Gerrand <adg@golang.org>
* goinstall: support GOPATH; building and installing outside the Go treeAndrew Gerrand2011-04-271-10/+14
| | | | | | | | | | | | | | | | | | | | | | For example, with GOPATH set like so GOPATH=/home/adg/gocode And after creating some subdirectories mkdir /home/adg/gocode/{bin,pkg,src} I can use goinstall to install the github.com/nf/goto web server, which depends on the github.com/nf/stat package, with goinstall github.com/nf/goto This downloads and installs all dependencies (that aren't already installed) like so /home/adg/gocode/bin/goto /home/adg/gocode/pkg/darwin_amd64/github.com/nf/stat.a /home/adg/gocode/src/github.com/nf/goto/... /home/adg/gocode/src/github.com/nf/stat/... R=rsc, niemeyer CC=golang-dev http://codereview.appspot.com/4438043
* src/pkg/Makefile: trim per-directory make output except on failureRuss Cox2011-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not committed to this but it sure makes the output easier to skim. With this CL: $ make install runtime install sync/atomic install sync install unicode install utf16 install syscall install os ... install ../cmd/govet install ../cmd/goyacc install ../cmd/hgpatch $ make test test archive/tar test archive/zip test asn1 test big test bufio ... test path test path/filepath TEST FAIL reflect gotest rm -f _test/reflect.a 6g -o _gotest_.6 deepequal.go type.go value.go rm -f _test/reflect.a gopack grc _test/reflect.a _gotest_.6 all_test.go:210: invalid type assertion: reflect.NewValue(tt.i).(*StructValue) (non-interface type reflect.Value on left) all_test.go:217: cannot type switch on non-interface value v (type reflect.Value) all_test.go:218: undefined: IntValue all_test.go:221: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:223: cannot use 8 (type int) as type reflect.Value in function argument all_test.go:225: cannot use 16 (type int) as type reflect.Value in function argument all_test.go:227: cannot use 32 (type int) as type reflect.Value in function argument all_test.go:229: cannot use 64 (type int) as type reflect.Value in function argument all_test.go:231: undefined: UintValue all_test.go:234: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:234: too many errors gotest: "/Users/rsc/g/go/bin/6g -I _test -o _xtest_.6 all_test.go tostring_test.go" failed: exit status 1 make[1]: *** [test] Error 2 make: *** [reflect.test] Error 1 R=r, r2 CC=golang-dev http://codereview.appspot.com/4343046
* Make.pkg: increase test timeout to 120 seconds.Ian Lance Taylor2011-04-021-1/+1
| | | | | | R=r, peterGo CC=golang-dev http://codereview.appspot.com/4344053
* testing: add -test.timeout option.Ian Lance Taylor2011-03-311-1/+1
| | | | | | | | | | | Since Go code can deadlock, this lets a testsuite driver set a time limit for the test to run. This is simple but imperfect, in that it only catches deadlocks in Go code, not in the runtime scheduler. R=r, rsc, iant2 CC=golang-dev http://codereview.appspot.com/4326048
* testing: set up structure for faster testing using the new -test.short flag.Rob Pike2011-03-251-0/+3
| | | | | | | | | | | | | | New make target "testshort" runs "gotest -test.short" and is invoked by run.bash, which is invoked by all.bash. Use -test.short to make one package (crypto ecdsa) run much faster. More changes to come. Once this is in, I will update the long-running tests to use the new flag. R=rsc CC=golang-dev http://codereview.appspot.com/4317043
* Make.pkg: Always define _CGO_CFLAGS and friends.Ian Lance Taylor2011-03-221-10/+8
| | | | | | | | Submitting TBR to fix Darwin build. TBR=rsc CC=golang-dev http://codereview.appspot.com/4273096
* Make.pkg: add support for SWIG, and add two SWIG examplesIan Lance Taylor2011-03-221-8/+66
| | | | | | | | The SWIG examples are not yet built or tested by default. R=r, rsc, iant2 CC=golang-dev http://codereview.appspot.com/4287056
* build: remove old cgo filesRuss Cox2011-03-061-1/+1
| | | | | | | | | | | Cgo changed to write these files into _obj, but some trees may still have the old ones in the source directory. They need to be removed during make clean so that a subsequent build will use the ones in _obj. R=r, r2 CC=golang-dev http://codereview.appspot.com/4254056
* fix build (observed in wild, not on dashboard)Russ Cox2011-03-031-0/+1
| | | | | | TBR=r CC=golang-dev http://codereview.appspot.com/4257054
* fix buildRuss Cox2011-03-021-1/+2
| | | | | | TBR=rog CC=golang-dev http://codereview.appspot.com/4259046
* cgo: put temporary source files in _obj.Roger Peppe2011-03-021-24/+24
| | | | | | | | | | | | | Fixes issue 1572. Initially I tried changing things so all object files get put in _obj, but it's too much - everything needs changing. Perhaps some other time. R=rsc CC=golang-dev http://codereview.appspot.com/4237050 Committer: Russ Cox <rsc@golang.org>
* runtime: fix signal stack bugRuss Cox2011-02-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In CL 4188061 I changed malg to allocate the requested number of bytes n, not n+StackGuard, so that the allocations would use rounder numbers. The allocation of the signal stack asks for 32k and then used g->stackguard as the base, but g->stackguard is StackGuard bytes above the base. Previously, asking for 32k meant getting 32k+StackGuard bytes, so using g->stackguard as the base was safe. Now, the actual base must be computed, so that the signal handler does not run StackGuard bytes past the top of the stack. Was causing flakiness mainly in programs that use the network, because they sometimes write to closed network connections, causing SIGPIPEs. Was also causing problems in the doc/progs test. Also fix Makefile so that changes to stack.h trigger rebuild. R=bradfitzgo, r, r2 CC=golang-dev http://codereview.appspot.com/4230044
* build: remove _gcc_main.c during make cleanRuss Cox2011-02-231-1/+1
| | | | | | R=r, r2 CC=golang-dev http://codereview.appspot.com/4226043
* Make.pkg, doc: Replace references to "-benchmarks" and "-match" with ↵Kyle Consalus2011-02-221-1/+1
| | | | | | | | | | "-test.bench" and "-test.run". R=r CC=golang-dev http://codereview.appspot.com/4197041 Committer: Rob Pike <r@golang.org>
* cgo: don't run cgo when not compilingGustavo Niemeyer2011-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The logic introduced to avoid running cgo when introducing _cgo_flags is faulty. My goal was to handle it with the following statement: -include _cgo_flags The dash tells make to ignore errors if it can't include the file. What I missed, though, was the fact that it *will* attempt to build the file if it knows how. This change will introduce the originally intended semantics of not attempting to build the file before necessary. R=rsc CC=golang-dev http://codereview.appspot.com/4023069 Committer: Russ Cox <rsc@golang.org>
* build: fix spaces in GOROOTChristopher Nielsen2011-02-031-1/+1
| | | | | | | | | | Fixes issue 1413. R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/4007041 Committer: Russ Cox <rsc@golang.org>
* cgo: fix _cgo_run timestamp file orderGustavo Niemeyer2011-02-021-1/+1
| | | | | | | | | | | | | | The timestamp file is being created before cgo runs, which means errors will not prevent it from being created and thus will cause the build to break by rendering the rule up-to-date when it isn't. R=rsc CC=golang-dev http://codereview.appspot.com/4001049 Committer: Russ Cox <rsc@golang.org>
* cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go filesGustavo Niemeyer2011-02-011-6/+16
| | | | | | | | R=rsc, binet CC=golang-dev http://codereview.appspot.com/3921043 Committer: Russ Cox <rsc@golang.org>
* Make.pkg: use installed runtime.h for cgoRuss Cox2011-01-061-1/+1
| | | | | | | | Fixes issue 1381. R=r, r2 CC=golang-dev http://codereview.appspot.com/3775050
* fix cgo buildRuss Cox2010-12-171-1/+1
| | | | | | R=r CC=golang-dev http://codereview.appspot.com/3750041
* cgo: handle references to symbols in shared librariesRuss Cox2010-12-171-6/+2
| | | | | | | | Fixes issue 1334. R=r CC=golang-dev http://codereview.appspot.com/3746041
* misc/cgo/life: fix, add to buildRuss Cox2010-12-171-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #pragma dynexport is no longer needed for this use of cgo, since the gcc and gc code are now linked together into the same binary. It may still be necessary later. On the Mac, you cannot use the GOT to resolve symbols that exist in the current binary, so 6l and 8l translate the GOT-loading mov instructions into lea instructions. On ELF systems, we could use the GOT for those symbols, but for consistency 6l and 8l apply the same translation. The translation is sketchy in the extreme (depending on the relocation being in a mov instruction) but it verifies that the instruction is a mov before rewriting it to lea. Also makes typedefs global across files. Fixes issue 1335. Fixes issue 1345. R=iant, r CC=golang-dev http://codereview.appspot.com/3650042
* cgo: new cgoRuss Cox2010-12-081-23/+27
| | | | | | | | | | | Very few changes here: the subtle ones are in Make.pkg. Note that incredibly (and importantly) there are no changes necessary to the test programs in misc/cgo. R=iant CC=golang-dev http://codereview.appspot.com/3504041
* Makefiles: Don't define _64BIT now that 6c does it by default.Ian Lance Taylor2010-11-181-2/+1
| | | | | | R=rsc CC=golang-dev http://codereview.appspot.com/3207041
* debug/pe, cgo: add windows supportWei Guangjing2010-11-011-0/+1
| | | | | | | | R=rsc, mattn CC=golang-dev http://codereview.appspot.com/1976045 Committer: Russ Cox <rsc@golang.org>
* Make.pkg: remove .so before installing new oneRuss Cox2010-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On Linux, overwriting an mmap'ed file causes all the MAP_PRIVATE pages to get refreshed with the new content, even ones that have been modified by the process that did the mmap. One specific instance of this is that after the dynamic linker has relocated a page from a .so, overwriting the .so will un-relocate it, making the next use of one of the no-longer-relocated addresses incorrect and probably crash the program. Linux must go out of its way to break programs in this way: the pages have already been copied on write, so they're not shared with the file system cache, and it trashes them anyway. The manual says the behavior when the file gets overwritten is "undefined". Removing before copy avoids the undefined behavior. R=iant CC=golang-dev, msolo http://codereview.appspot.com/2333045
* build: generate, clean .exe files on WindowsJoe Poirier2010-09-091-1/+1
| | | | | | | | R=rsc, brainman, vcc CC=golang-dev http://codereview.appspot.com/2165044 Committer: Russ Cox <rsc@golang.org>
* build: work with GNU Make 3.82Jukka-Pekka Kekkonen2010-09-071-1/+4
| | | | | | | | | | | | | Fix building on GNU Make 3.82 (caused by mixed implicit and normal rules). The issue was introduced in changeset 6110:ca0beac3b543. R=rsc CC=golang-dev http://codereview.appspot.com/2100044 Committer: Russ Cox <rsc@golang.org>
* Make.pkg: never use quietgccRuss Cox2010-08-261-0/+10
| | | | | | R=iant CC=golang-dev http://codereview.appspot.com/2033041
* build: fix cgo with -j2Russ Cox2010-08-261-5/+2
| | | | | | | | | a b: c expands to multiple rules, which then run in parallel. R=r, iant CC=golang-dev http://codereview.appspot.com/2007047
* gotest: allow make test of cgo packages (without make install)Russ Cox2010-08-251-4/+8
| | | | | | R=r CC=golang-dev, stevvooe http://codereview.appspot.com/1995051
* build: $GOBIN defaults to $GOROOT/binRuss Cox2010-08-241-21/+15
| | | | | | R=r CC=golang-dev http://codereview.appspot.com/1982049
* cgo: use new command line syntax: -- separates cgo flags from gcc flagsRuss Cox2010-07-151-1/+1
| | | | | | | | Fixes issue 922. R=r CC=golang-dev http://codereview.appspot.com/1664051
* cgo: use slash-free relative paths for .so referencesRuss Cox2010-06-301-2/+3
| | | | | | | | | | | | | | | 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
* Add _cgo_export.[ch] targets so that make knows how they areIan Lance Taylor2010-05-031-1/+1
| | | | | | | | | | | | built. Note that they are only built if a //export comment appears, so other targets should only use them if there is such a comment. Fixes issue 723. R=rsc CC=golang-dev http://codereview.appspot.com/1073041
* Add //export to cgo.Ian Lance Taylor2010-04-091-5/+9
| | | | | | | | | | | | | | | | | The new //export comment marks a Go function as callable from C. The syntax is "//export NAME" where NAME is the name of the function as seen from C. If such a comment is seen, cgo will generate two new files: _cgo_export.h and _cgo_export.c. The _cgo_export.h file provides declarations which C code may use to call Go functions. The _cgo_export.c file contains wrappers, and is to be compiled with gcc. The changes to Make.pkg support using this from a Go Makefile, though it could probably be more convenient. R=rsc CC=golang-dev http://codereview.appspot.com/853042