Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Tianon Gravi authored on 2015/01/14 13:35:21... | ... |
@@ -97,9 +97,6 @@ RUN cd /usr/local/go/src \ |
97 | 97 |
./make.bash --no-clean 2>&1; \ |
98 | 98 |
done |
99 | 99 |
|
100 |
-# Reinstall standard library with netgo |
|
101 |
-RUN go clean -i net && go install -tags netgo std |
|
102 |
- |
|
103 | 100 |
# We still support compiling with older Go, so need to grab older "gofmt" |
104 | 101 |
ENV GOFMT_VERSION 1.3.3 |
105 | 102 |
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 |
... | ... |
@@ -113,7 +113,8 @@ fi |
113 | 113 |
EXTLDFLAGS_STATIC='-static' |
114 | 114 |
# ORIG_BUILDFLAGS is necessary for the cross target which cannot always build |
115 | 115 |
# with options like -race. |
116 |
-ORIG_BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" ) |
|
116 |
+ORIG_BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" -installsuffix netgo ) |
|
117 |
+# see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here |
|
117 | 118 |
BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" ) |
118 | 119 |
# Test timeout. |
119 | 120 |
: ${TIMEOUT:=30m} |