]> Cypherpunks.ru repositories - gostls13.git/commitdiff
build: unset GOBIN during build
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 19 May 2016 17:43:04 +0000 (17:43 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 19 May 2016 18:40:53 +0000 (18:40 +0000)
Fixes #14340

Change-Id: I43e1624fafc972fb868708c3857fc8acf1bfbbd7
Reviewed-on: https://go-review.googlesource.com/23255
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/make.bash
src/make.bat
src/make.rc
src/run.bash
src/run.bat
src/run.rc

index 82c903eadbb8b67c02a161d2783a3b583dc8982d..1a1412a00cf57e26ef31996e8e285bf094107bf4 100755 (executable)
@@ -50,6 +50,9 @@
 # GO_DISTFLAGS: extra flags to provide to "dist bootstrap".
 
 set -e
+
+unset GOBIN # Issue 14340
+
 if [ ! -f run.bash ]; then
        echo 'make.bash must be run from $GOROOT/src' 1>&2
        exit 1
index a64777ee917d316985c1b93f37068b9932223b51..bf25b95ca5097d5d52981f7c6b059f00d22d6c37 100644 (file)
@@ -68,6 +68,7 @@ setlocal
 set GOROOT=%GOROOT_BOOTSTRAP%
 set GOOS=
 set GOARCH=
+set GOBIN=
 "%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist
 endlocal
 if errorlevel 1 goto fail
index 60162045ede4b077275631489a0eaa0ffe1434d9..243f83cc0f0223fd7e66ecb159a0f9f76f1f4ffd 100755 (executable)
@@ -80,7 +80,7 @@ if(~ $sysname vx32)
 
 if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
        echo '##### Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
-       GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
+       GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOBIN= \
                $GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std cmd
        echo
 }
index 3acf46a9961a2dcc4b889c156303ec1bf0f85648..293b775efa5e77bac473df02ea5c3dd4eb08f9a2 100755 (executable)
@@ -11,6 +11,7 @@ export GOROOT   # the api test requires GOROOT to be set.
 unset CDPATH   # in case user has it set
 unset GOPATH    # we disallow local import for non-local packages, if $GOROOT happens
                 # to be under $GOPATH, then some tests below will fail
+unset GOBIN     # Issue 14340
 
 export GOHOSTOS
 export CC
index 01a66bc574876aefd021e707a494620e853178e8..6e42922a86e594f372f077846435a539c4333322 100644 (file)
@@ -15,6 +15,8 @@ set GOBUILDFAIL=0
 :: we disallow local import for non-local packages, if %GOROOT% happens
 :: to be under %GOPATH%, then some tests below will fail
 set GOPATH=
+:: Issue 14340: ignore GOBIN during all.bat.
+set GOBIN=
 
 rem TODO avoid rebuild if possible
 
index d314808f3f28a7c2b3c7001324921ee318404ee9..88d77912e31efc74088c885abdd47d275c3b27a4 100755 (executable)
@@ -9,5 +9,6 @@ eval `{go env}
 
 GOPATH = () # we disallow local import for non-local packages, if $GOROOT happens
             # to be under $GOPATH, then some tests below will fail
+GOBIN = () # Issue 14340
 
 exec go tool dist test -rebuild $*