From b5aba426d4bb903825ec4b3b4912f521daac4c2a Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 13 Jan 2015 21:35:21 -0700 Subject: [PATCH] =?UTF-8?q?Add=20proper=20"netgo"=20compiling,=20thanks=20?= =?UTF-8?q?to=20rsc=20=E2=99=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andrew "Tianon" Page --- Dockerfile | 3 --- project/make.sh | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ef05b5613..45128609e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,9 +97,6 @@ RUN cd /usr/local/go/src \ ./make.bash --no-clean 2>&1; \ done -# Reinstall standard library with netgo -RUN go clean -i net && go install -tags netgo std - # We still support compiling with older Go, so need to grab older "gofmt" ENV GOFMT_VERSION 1.3.3 RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt diff --git a/project/make.sh b/project/make.sh index f7919515cf..0540649f16 100755 --- a/project/make.sh +++ b/project/make.sh @@ -113,7 +113,8 @@ fi EXTLDFLAGS_STATIC='-static' # ORIG_BUILDFLAGS is necessary for the cross target which cannot always build # with options like -race. -ORIG_BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" ) +ORIG_BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" -installsuffix netgo ) +# see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" ) # Test timeout. : ${TIMEOUT:=30m}