]> Cypherpunks repositories - gostls13.git/commitdiff
build: do not set GOBIN on Plan 9
authorAnthony Martin <ality@pbrane.org>
Tue, 26 Feb 2013 17:25:46 +0000 (09:25 -0800)
committerAnthony Martin <ality@pbrane.org>
Tue, 26 Feb 2013 17:25:46 +0000 (09:25 -0800)
Also, I synced the rc files with changes
that have been made to make.bash, etc.

R=seed, rminnich, r
CC=golang-dev
https://golang.org/cl/7389049

src/all.rc
src/cmd/dist/plan9.c
src/make.rc
src/run.rc

index b9d4c32eb99affaffc16676d7f887f7659c9ca7a..14e2f5565aebaabeeef51566b985a1c2677e928d 100755 (executable)
@@ -3,6 +3,8 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+rfork n
+
 if(! test -f make.rc){
        echo 'all.rc must be run from $GOROOT/src' >[1=2]
        exit wrongdir
index f289f5213c6aa1a157d847810aa33d994cd4744b..8a7c0ab1c3d23679c1ef37b734768a8f6fc36f6a 100644 (file)
@@ -700,12 +700,6 @@ main(int argc, char **argv)
                fatal("$objtype is unset");
        gohostarch = btake(&b);
 
-       xgetenv(&b, "GOBIN");
-       if(b.len == 0){
-               bpathf(&b, "/%s/bin", gohostarch);
-               xsetenv("GOBIN", bstr(&b));
-       }
-
        srand(time(0)+getpid());
        init();
        xmain(argc, argv);
index 986ce854607ef958de571a3afdbf480b0045bdba..83d16c04552dee8ff68a1198085e88a455c12cae 100755 (executable)
 # GO_LDFLAGS: Additional 5l/6l/8l arguments to use when
 # building the commands.
 #
-# CGO_ENABLED: Setting this to 0 disables the use of cgo
-# in the built and installed packages and tools.
+# GO_CCFLAGS: Additional 5c/6c/8c arguments to use when
+# building.
+#
+# CGO_ENABLED: Controls cgo usage during the build. Set it to 1
+# to include all cgo related files, .c and .go file with "cgo"
+# build directive, in the build. Set it to 0 to ignore them.
 
 rfork e
-if(! test -f run.bash){
+if(! test -f run.rc){
        echo 'make.rc must be run from $GOROOT/src' >[1=2]
        exit wrongdir
 }
 
 # Clean old generated file that will cause problems in the build.
-rm -rf ./pkg/runtime/runtime_defs.go
+rm -f ./pkg/runtime/runtime_defs.go
 
 # Determine the host compiler toolchain.
 eval `{grep '^(CC|LD|O)=' /$objtype/mkfile}
@@ -72,17 +76,19 @@ mv cmd/dist/dist $GOTOOLDIR/dist
 $GOTOOLDIR/go_bootstrap clean -i std
 echo
 
-# TODO(ality): remove the -p flag once the exec/await/RFNOTEG race is fixed.
+# Run only one process at a time on 9vx.
+if(~ $sysname vx32)
+       pflag = (-p 1)
 
 if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
        echo '# Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
        GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
-               $GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v -p 1 std
+               $GOTOOLDIR/go_bootstrap install -ccflags $"GO_CCFLAGS -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
        echo
 }
 
 echo '# Building packages and commands for' $GOOS/$GOARCH^.
-$GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v -p 1 std
+$GOTOOLDIR/go_bootstrap install -ccflags $"GO_CCFLAGS -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
 echo
 
 rm -f $GOTOOLDIR/go_bootstrap
index 7e5d8ce379d2f486a4443055109dee8af06f4656..e493eae36bd50988cb37581aadeb93328c08e811 100755 (executable)
@@ -3,24 +3,37 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-eval `{go tool dist env -9}
+rfork e
+
+eval `{go env}
+
+GOPATH = () # we disallow local import for non-local packges, if $GOROOT happens
+            # to be under $GOPATH, then some tests below will fail
 
 # allow all.rc to avoid double-build of everything
 rebuild = true
 if(~ $1 --no-rebuild)
        shift
 if not {
+       # Run only one process at a time on 9vx.
+       if(~ $sysname vx32)
+               pflag = (-p 1)
        echo '# Building packages and commands.'
-       time go install -a -v -p 1 std
+       time go install -a -v $pflag std
        echo
 }
 
+# we must unset GOROOT_FINAL before tests, because runtime/debug requires
+# correct access to source code, so if we have GOROOT_FINAL in effect,
+# at least runtime/debug test will fail.
+GOROOT_FINAL = ()
+
 echo '# Testing packages.'
 time go test std -short -timeout 120s
 echo
 
 echo '# GOMAXPROCS=2 runtime -cpu=1,2,4'
-GOMAXPROCS=2 go test runtime -short -timeout 120s -cpu 1,2,4
+GOMAXPROCS=2 go test runtime -short -timeout 240s -cpu 1,2,4
 echo
 
 echo '# sync -cpu=10'