1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #26875 from justincormack/1.12.x-sierra-go

Patch Go with fix for OSX Sierra
This commit is contained in:
Victor Vieux 2016-09-25 00:17:00 -07:00 committed by GitHub
commit 03da508273

View file

@ -121,11 +121,6 @@ RUN set -x \
# will need updating, to avoid errors. Ping #docker-maintainers on IRC
# with a heads-up.
ENV GO_VERSION 1.6.3
RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
# Compile Go for cross compilation
ENV DOCKER_CROSSPLATFORMS \
@ -134,6 +129,20 @@ ENV DOCKER_CROSSPLATFORMS \
freebsd/amd64 freebsd/386 freebsd/arm \
windows/amd64 windows/386
RUN curl -fsSL "https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz" \
| tar -xzC /root && \
mv /root/go /root/go1.4 && \
cd /usr/local && \
curl -fsSL "https://storage.googleapis.com/golang/go$GO_VERSION.src.tar.gz" \
| tar -xzC /usr/local && \
cd go && \
printf 'diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s\nindex e09b906..fa8ff2f 100644\n--- a/src/runtime/sys_darwin_amd64.s\n+++ b/src/runtime/sys_darwin_amd64.s\n@@ -157,6 +157,7 @@ systime:\n\t// Fall back to system call (usually first call in this thread).\n\tMOVQ\tSP, DI\n\tMOVQ\t$0, SI\n+\tMOVQ\t$0, DX // required as of Sierra; Issue 16570\n\tMOVL\t$(0x2000000+116), AX\n\tSYSCALL\n\tCMPQ\tAX, $0\n' | patch -p1 && \
cd src && \
./make.bash
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
# This has been commented out and kept as reference because we don't support compiling with older Go anymore.
# 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