aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
AgeCommit message (Collapse)Author
2015-08-24make.bash: abort if $GOROOT_BOOTSTRAP == $GOROOTDave Cheney
Fixes #12214 Change-Id: I82586b54ac7b9c0c71055bb66b921e3efbf4977c Reviewed-on: https://go-review.googlesource.com/13719 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-17doc: replace references to {5..9}{g,l} with go tool compile and go tool linkJeremy Jackins
I updated some references to 6g, 6l and friends that I came across, as those programs don't exist anymore. I also fixed some echos in make.rc to match other make.* scripts while I was there. Change-Id: Ib84532cd4688cf65174dd9869e5d42af98a20a48 Reviewed-on: https://go-review.googlesource.com/11162 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-02-23[dev.cc] cmd/go: fix expansion of 'std', add 'cmd'Russ Cox
The wildcard 'std' is defined in documentation to be all the packages in the Go standard library. It has also historically matched commands in the main repo, but as we implement core commands in Go, that becomes problematic. We need a wildcard that means just the library, and since 'std' is already documented to have that definition, make it so. Add a new wildcard 'cmd' for the commands in the main repo ($GOROOT). Commands that want both can say 'std cmd' (or 'cmd std') to get the effect of the old 'std'. Update make.bash etc to say both std and cmd most of the time. Exception: in race.bash, do not install race-enabled versions of the actual commands. This avoids trying to write binaries while using them, but more importantly it avoids enabling the race detector and its associated memory overhead for the already memory-hungry compilers. Change-Id: I26bb06cb13b636dfbe71a015ee0babeb270a0275 Reviewed-on: https://go-review.googlesource.com/5550 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2015-02-04[dev.cc] all: merge master (b8fcae0) into dev.ccRuss Cox
Change-Id: I2aa1d0b0c4cf7632a54e843810959b468e3812ab
2015-02-04cmd/go, make: remove ccflagsJosh Bleecher Snyder
cc is no more. Change-Id: I8d1bc0d2e471cd9357274204c9bc1fa67cbc272d Reviewed-on: https://go-review.googlesource.com/3833 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21[dev.cc] build: do not 'clean -i std' between dist and go_bootstrapRuss Cox
Executing 'clean -i std' removes installed Go programs, including the toolchain binaries we need for building. It's not clear why the 'clean -i std' is here in the first place. cmd/dist just removed the entire pkg tree, so everything is new. The only reason for 'clean -i std' would be if you don't trust that dist compiled the packages properly. If that's true for some reason, we can fix cmd/dist, or add -a to the install commands that follow. Perhaps clean -i std should not remove tools, or perhaps std should not expand to any tools. Not sure. Also remove banner from make.bat and make.rc that was already removed from make.bash. cmd/dist prints it now. Also fix array size error in liblink/objfile.c. Fixes dev.cc build. Change-Id: I60855e001a682efce55ad9aa307a8f3ee47f7366 Reviewed-on: https://go-review.googlesource.com/3100 Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-21[dev.cc] cmd/dist: bootstrap Go toolchain using Go 1.4Russ Cox
Bootstrap the Go parts of the Go toolchain using Go 1.4, as described in https://golang.org/s/go15bootstrap. The first Go part of the Go toolchain will be cmd/objwriter, but for now that's just an empty program to test that this new code works. Once the build dashboard is okay with this change, we'll make objwriter a real program depended upon by the build. Change-Id: Iad3dce675571cbdb5ab6298fe6f98f53ede47d5c Reviewed-on: https://go-review.googlesource.com/3044 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-14[dev.cc] build: do not pass GOHOSTOS and GOHOSTARCH to Go 1.4 buildRuss Cox
Go 1.4 should build what it knows how to build. GOHOSTOS and GOHOSTARCH are for the Go 1.5 build only. Change-Id: Id0f367f03485100a896e61cfdace4ac44a22e16d Reviewed-on: https://go-review.googlesource.com/2818 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-14[dev.cc] build: fix cross-compilationRuss Cox
Fixes #9574. Change-Id: Ifd7ecccb25e934f9aba284b2d72b6b22f18cb0b6 Reviewed-on: https://go-review.googlesource.com/2812 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-10build: require old Go to build new Go (and convert cmd/dist to Go)Russ Cox
This CL introduces the bootstrap requirement that in order to build the current release (or development version) of Go, you need an older Go release (1.4 or newer) already installed. This requirement is the whole point of this CL. To enforce the requirement, convert cmd/dist from C to Go. With this bootstrapping out of the way, we can move on to replacing other, larger C programs like the Go compiler, the assemblers, and the linker. See golang.org/s/go15bootstrap for details. Change-Id: I53fd08ddacf3df9fae94fe2c986dba427ee4a21d Reviewed-on: https://go-review.googlesource.com/2470 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2014-12-13build: change all.bash output to be more markdown-friendlyRuss Cox
People keep pasting all.bash output into GitHub bugs, which turns the # lines into <h1> headlines. Add some more #s so that the bug reports are more readable. Not ideal but seems like the best of a few bad options. Change-Id: I4c69930ec304b2d504d7cd66221281a8577b87ae Reviewed-on: https://go-review.googlesource.com/1286 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-09-08build: adjustments for move from src/pkg to srcRuss Cox
This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134570043
2014-05-20build: make nacl passRuss Cox
Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes #7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://golang.org/cl/100590044
2014-04-29make.bash: if CC is not set, and gcc doesn't exist, try clang/clang++.Shenghou Ma
This should make Go build without setting CC and CXX on newer FreeBSDs. LGTM=iant R=golang-codereviews, dave, gobot, iant CC=golang-codereviews https://golang.org/cl/89230045
2014-02-06cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabledElias Naur
Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET. CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while CC remains for compiling for GOHOSTARCH. CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for GOARCH. CGO_ENABLED defaults to disabled when cross compiling and has to be explicitly enabled. Update #4714 LGTM=minux.ma, iant R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef CC=golang-codereviews https://golang.org/cl/57100043
2013-10-01cmd/dist, build: support building statically linked toolchainShenghou Ma
Added a new $GO_DISTFLAGS to make.bash, and while we're here, added mention $CXX in make.bash (CL 13704044). Fixes #6448. Update #3564 We can pass GO_DISTFLAGS=-s from misc/dist to make.bash so that it will build a statically linked toolchain. (Note: OS X doesn't have the concept of static linking, so don't pass GO_DISTFLAGS=-s for OS X builds) R=adg, rsc, iant CC=golang-dev https://golang.org/cl/13887043
2013-08-19make.bash: exit if dist failsRob Pike
The shell's -e doesn't work across "eval"; need to error-check by hand. The recent spate of Darwin build failures pointed out that if the first run of cmd/dist fails, we keep going. We shouldn't. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/13098043
2013-04-16cmd/dist, make.bash: pass -mmacosx-version-min=10.6 to gcc on DarwinShenghou Ma
Fixes #5261. R=golang-dev, r CC=golang-dev https://golang.org/cl/8798044
2013-03-29cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internalIan Lance Taylor
Change build system to set GO_EXTLINK_ENABLED=0 by default for OS X 10.6, since the system linker has a bug and can not handle the object files generated by 6l. Fixes #5130. R=golang-dev, r CC=golang-dev https://golang.org/cl/8183043
2013-03-16make.bash: delete vestigial TODO, now resolvedRob Pike
R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7789050
2013-03-12go/types: delete from main repo; part of move to go.expRob Pike
See also https://golang.org/cl/7656044 R=golang-dev, gri, rsc CC=golang-dev https://golang.org/cl/7625048
2013-03-06make.bash,bat: add -tags gotypes to the buildRob Pike
This installs type checking into go vet. (To be removed before releasing Go 1.1) R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7528044
2013-02-15build: clang supportRuss Cox
This works with at least one version of clang that existed at one moment in time. No guarantees about clangs past or future. To try: CC=clang all.bash It does not work with the Xcode clang, because that clang fails at printing a useful answer to: clang -print-libgcc-file-name The clang that works prints a full path name for that command, not just "libgcc.a". Fixes #4713. R=iant, minux.ma CC=golang-dev https://golang.org/cl/7323068
2013-02-01cmd/6c, cmd/6g: add flag to support large-model code generationElias Naur
Added the -pic flag to 6c and 6g to avoid assembler instructions that cannot use RIP-relative adressing. This is needed to support the -shared mode in 6l. See also: https://golang.org/cl/6926049 https://golang.org/cl/6822078 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7064048
2012-12-04cmd/dist: support building on debian/kFreeBSDDave Cheney
The debian/kFreeBSD project uses the FreeBSD kernel and the debian userspace. From our point of view, this is freebsd not linux as GOOS talks about the kernel syscall interface, not the userspace (although cgo alters that). As debian/kFreeBSD is experimental at this time, I do not think it is worth the effort of duplicating all the freebsd specific code so this is proposal represents a reasonable workaround. Currently cgo is not supported, make.bash will detect this and disable cgo automatically during the build. dfc@debian:~/go/src$ uname -a GNU/kFreeBSD debian 8.1-1-686 #0 Sat Jul 21 17:02:04 UTC 2012 i686 i386 Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz GNU/kFreeBSD dfc@debian:~/go/src$ ../bin/go version go version devel +d05272f402ec Sat Dec 01 15:15:14 2012 -0800 Tested with GOOS=freebsd GOARCH=386 R=golang-dev CC=golang-dev https://golang.org/cl/6868046
2012-03-20build: do more during windows buildAlex Brainman
- use GO_GCFLAGS and GO_LDFLAGS if supplied - build misc\dashboard\builder and misc\goplay - run tests in test\bench\go1 - check api compatibility R=golang-dev, r, kardianos, bradfitz CC=golang-dev https://golang.org/cl/5847063
2012-03-13build: update comment about GO_LDFLAGS.David Symonds
(5l/6l/8l aren't involved in building packages) R=golang-dev, robert.hencke CC=golang-dev https://golang.org/cl/5798071
2012-03-13build: build correct cmd/dist matching GOHOSTARCHShenghou Ma
Fix for issue 3210 comment #1. R=adg, rsc CC=golang-dev https://golang.org/cl/5794057
2012-03-07make.bash: fix old buildsRuss Cox
Fixes #3222. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5761044
2012-03-02build: add GO_ prefix to LDFLAGS and GCFLAGSGustavo Niemeyer
Build environments will often define stock LDFLAGS that are not compatible with the gc ld, causing non-obvious failures midway through the build. R=golang-dev, rsc, minux.ma, rsc CC=golang-dev https://golang.org/cl/5724044
2012-03-01cmd/go: fixesRuss Cox
* Install tools into tool dir always (Fixes issue 3049. Fixes issue 2868. Fixes issue 2925.) * Make packages depend on compiler, linker (Fixes issue 3036.) * Do not recompile packages across roots (Fixes issue 3149.) * Allow use of binary-only packages (Fixes issue 2775.) * Avoid duplicate cgo dependencies (Fixes issue 3001.) * Show less in go get -x. (Fixes issue 2926.) * Do not force repo root for existing checkout (Fixes issue 2969.) * Show full syntax error list always (Fixes issue 2811.) * Clean arguments before processing (Fixes issue 3034.) * Add flags for compiler, linker arguments (Fixes issue 2996.) * Pass flags in make.bash (Fixes issue 3091.) * Unify build flags, defined in one place. * Clean up error messages (Fixes issue 3075. Fixes issue 2923.) * Support local import paths (Fixes issue 3118.) * Allow top-level package outside $GOPATH (Fixes issue 3009.) In addition to these fixes, all commands now take a list of go files as a way to specify a single package, just as go build and go run always have. This means you can: go list -json x.go go fix x.go go vet x.go go test x_test.go Preliminary tests in test.bash. Mainly testing things that the ordinary build does not. I don't mind if the script doesn't run on Windows. I expect that gccgo support is now broken, and I hope that people will feel free to file issues and/or send CLs to fix it. :-) R=golang-dev, dsymonds, r, rogpeppe CC=golang-dev https://golang.org/cl/5708054
2012-02-15build: add make.bash --no-clean optionRuss Cox
Makes it possible to run GOARCH=amd64 make.bash GOARCH=386 make.bash --no-clean to avoid deleting some of the work done by the first one. R=golang-dev CC=golang-dev https://golang.org/cl/5673056
2012-02-15build: create the correct $GOTOOLDIR.David Symonds
Before this, make.bash --dist-tool would fail, because $GOROOT/bin/tool was being mkdir'd instead of $GOROOT/pkg/tool/linux_amd64. R=rsc CC=golang-dev https://golang.org/cl/5666046
2012-02-13build: set $PATH during make.bashRuss Cox
Should fix build breakage. TBR=golang-dev CC=golang-dev https://golang.org/cl/5656050
2012-02-13cmd/dist: cross-compiling fixesRuss Cox
This CL makes it possible to run make.bash with GOOS and GOARCH set to something other than the native host GOOS and GOARCH. As part of the CL, the tool directory moves from bin/tool/ to pkg/tool/goos_goarch where goos and goarch are the values for the host system (running the build), not the target. pkg/ is not technically appropriate, but C objects are there now tool (pkg/obj/) so this puts all the generated binaries in one place (rm -rf $GOROOT/pkg cleans everything). Including goos_goarch in the name allows different systems to share a single $GOROOT on a shared file system. Fixes #2920. R=golang-dev, r CC=golang-dev https://golang.org/cl/5645093
2012-02-12build: reject make.bash on WindowsRuss Cox
Also, echo cmd/dist during bootstrap build Makes that phase look like all the others. Fixes #2908. R=golang-dev, alex.brainman, bradfitz CC=golang-dev https://golang.org/cl/5655065
2012-02-09cmd/dist: fix GOROOT_FINALGustavo Niemeyer
R=rsc, gustavo CC=golang-dev https://golang.org/cl/5642045
2012-02-06build: add make.bash --dist-toolRuss Cox
R=golang-dev, n13m3y3r CC=golang-dev https://golang.org/cl/5634048
2012-02-04cmd/dist: fix buildRuss Cox
TBR=golang-dev CC=golang-dev https://golang.org/cl/5630049
2012-02-04build: use cmd/distRuss Cox
R=bradfitz, ality, r, r, iant, mikioh.mikioh CC=golang-dev https://golang.org/cl/5615058
2012-02-02build: rename $GOROOT/bin/go-tool to $GOROOT/bin/tool.Russ Cox
The go- is redundant now that the directory is required to be inside $GOROOT. Rob LGTMed the idea. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5618044
2012-01-31build: move goapi, quietgcc, cgo, gotype, ebnflint into go-toolRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5552054
2012-01-30build: remove Make.pkg, Make.toolRuss Cox
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 https://golang.org/cl/5601057
2012-01-30make.bash: don't remove hgpatchRob Pike
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5598046
2012-01-29cmd/go: first piece of tool rearrangementRob Pike
1) create go-tool dir in make.bash 2) clean up stale binaries in make.bash 3) add 'tool' command to go 4) convert goyacc->yacc as a first test tool Since goyacc stands alone, it's a safe trial. R=rsc CC=golang-dev https://golang.org/cl/5576061
2012-01-23cmd/go: implement go get + bug fixesRuss Cox
Move error information into Package struct, so that a package can be returned even if a dependency failed to load or did not exist. This makes it possible to run 'go fix' or 'go fmt' on packages with broken dependencies or missing imports. It also enables go get -fix. The new go list -e flag lets go list process those package errors as normal data. Change p.Doc to be first sentence of package doc, not entire package doc. Makes go list -json or go list -f '{{.ImportPath}} {{.Doc}}' much more reasonable. The go tool now depends on http, which means also net and crypto/tls, both of which use cgo. Trying to make the build scripts that build the go tool understand and handle cgo is too much work. Instead, we build a stripped down version of the go tool, compiled as go_bootstrap, that substitutes an error stub for the usual HTTP code. The buildscript builds go_bootstrap, go_bootstrap builds the standard packages and commands, including the full including-HTTP-support go tool, and then go_bootstrap gets deleted. Also handle the case where the buildscript needs updating during all.bash: if it fails but a go command can be found on the current $PATH, try to regenerate it. This gracefully handles situations like adding a new file to a package used by the go tool. R=r, adg CC=golang-dev https://golang.org/cl/5553059
2012-01-19doc: update out-of-date comments about runtime/cgoShenghou Ma
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5532100
2012-01-17buildscripts: move to buildscript directoryShenghou Ma
Fixes #2717. R=r, rsc, dsymonds CC=golang-dev https://golang.org/cl/5545069
2012-01-09cmd/go: add -v flag to build and installRuss Cox
The -v flag prints the names of packages as they are built/installed. Use -v in make.bash/run.bash to avoid a silent pause during the build while Go code is being compiled. R=golang-dev, r CC=golang-dev https://golang.org/cl/5532055
2012-01-05make.bash: remove old dregsAlex Brainman
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5522043