diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 83ae29f..098f4f6 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -25,13 +25,15 @@ RUN chmod +x $FETCH # Make sure apt-get is up to date and dependent packages are installed RUN \ apt-get update && \ - apt-get install -y automake autogen build-essential ca-certificates \ - gcc-5-arm-linux-gnueabi g++-5-arm-linux-gnueabi libc6-dev-armel-cross \ - gcc-5-arm-linux-gnueabihf g++-5-arm-linux-gnueabihf libc6-dev-armhf-cross \ - gcc-5-aarch64-linux-gnu g++-5-aarch64-linux-gnu libc6-dev-arm64-cross \ - gcc-5-multilib g++-5-multilib gcc-mingw-w64 g++-mingw-w64 clang llvm-dev \ - libtool libxml2-dev uuid-dev libssl-dev swig openjdk-8-jdk pkg-config patch \ - make xz-utils cpio wget zip unzip p7zip git mercurial bzr texinfo help2man \ + apt-get install -y automake autogen build-essential ca-certificates \ + gcc-5-arm-linux-gnueabi g++-5-arm-linux-gnueabi libc6-dev-armel-cross \ + gcc-5-arm-linux-gnueabihf g++-5-arm-linux-gnueabihf libc6-dev-armhf-cross \ + gcc-5-aarch64-linux-gnu g++-5-aarch64-linux-gnu libc6-dev-arm64-cross \ + gcc-5-mips64-linux-gnuabi64 g++-5-mips64-linux-gnuabi64 libc6-dev-mips64-cross \ + gcc-5-mips64el-linux-gnuabi64 g++-5-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross \ + gcc-5-multilib g++-5-multilib gcc-mingw-w64 g++-mingw-w64 clang llvm-dev \ + libtool libxml2-dev uuid-dev libssl-dev swig openjdk-8-jdk pkg-config patch \ + make xz-utils cpio wget zip unzip p7zip git mercurial bzr texinfo help2man \ --no-install-recommends # Fix any stock package issues diff --git a/docker/base/bootstrap_pure.sh b/docker/base/bootstrap_pure.sh index 765300b..92885cc 100644 --- a/docker/base/bootstrap_pure.sh +++ b/docker/base/bootstrap_pure.sh @@ -33,6 +33,14 @@ GOOS=linux GOARCH=386 CGO_ENABLED=1 go install std echo "Bootstrapping linux/arm64..." GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc-5 go install std +if [ $GO_VERSION -ge 170 ]; then + echo "Bootstrapping linux/mips64..." + GOOS=linux GOARCH=mips64 CGO_ENABLED=1 CC=mips64-linux-gnuabi64-gcc-5 go install std + + echo "Bootstrapping linux/mips64le..." + GOOS=linux GOARCH=mips64le CGO_ENABLED=1 CC=mips64el-linux-gnuabi64-gcc-5 go install std +fi + echo "Bootstrapping windows/amd64..." GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go install std diff --git a/docker/base/build.sh b/docker/base/build.sh index 28c1736..e0b5b59 100644 --- a/docker/base/build.sh +++ b/docker/base/build.sh @@ -379,6 +379,30 @@ for TARGET in $TARGETS; do CC=aarch64-linux-gnu-gcc-5 CXX=aarch64-linux-gnu-g++-5 GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$V $LD" $BM -o "/build/$NAME-linux-arm64`extension linux`" ./$PACK fi fi + if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "mips64" ]); then + if [ "$GO_VERSION" -lt 170 ]; then + echo "Go version too low, skipping linux/mips64..." + else + echo "Compiling for linux/mips64..." + CC=mips64-linux-gnuabi64-gcc-5 CXX=mips64-linux-gnuabi64-g++-5 HOST=mips64-linux-gnuabi64 PREFIX=/usr/mips64-linux-gnuabi64 $BUILD_DEPS /deps ${DEPS_ARGS[@]} + export PKG_CONFIG_PATH=/usr/mips64-linux-gnuabi64/lib/pkgconfig + + CC=mips64-linux-gnuabi64-gcc-5 CXX=mips64-linux-gnuabi64-g++-5 GOOS=linux GOARCH=mips64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK + CC=mips64-linux-gnuabi64-gcc-5 CXX=mips64-linux-gnuabi64-g++-5 GOOS=linux GOARCH=mips64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$V $LD" $BM -o "/build/$NAME-linux-mips64`extension linux`" ./$PACK + fi + fi + if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "mips64le" ]); then + if [ "$GO_VERSION" -lt 170 ]; then + echo "Go version too low, skipping linux/mips64le..." + else + echo "Compiling for linux/mips64le..." + CC=mips64el-linux-gnuabi64-gcc-5 CXX=mips64el-linux-gnuabi64-g++-5 HOST=mips64el-linux-gnuabi64 PREFIX=/usr/mips64el-linux-gnuabi64 $BUILD_DEPS /deps ${DEPS_ARGS[@]} + export PKG_CONFIG_PATH=/usr/mips64le-linux-gnuabi64/lib/pkgconfig + + CC=mips64el-linux-gnuabi64-gcc-5 CXX=mips64el-linux-gnuabi64-g++-5 GOOS=linux GOARCH=mips64le CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK + CC=mips64el-linux-gnuabi64-gcc-5 CXX=mips64el-linux-gnuabi64-g++-5 GOOS=linux GOARCH=mips64le CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$V $LD" $BM -o "/build/$NAME-linux-mips64le`extension linux`" ./$PACK + fi + fi # Check and build for Windows targets if [ $XGOOS == "." ] || [[ $XGOOS == windows* ]]; then # Split the platform version and configure the Windows NT version diff --git a/docker/go-1.5.0/Dockerfile b/docker/go-1.5.0/Dockerfile index ff817df..00b3c0e 100644 --- a/docker/go-1.5.0/Dockerfile +++ b/docker/go-1.5.0/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 150 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=5817fa4b2252afdb02e11e8b9dc1d9173ef3bd5a && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 150 diff --git a/docker/go-1.5.1/Dockerfile b/docker/go-1.5.1/Dockerfile index 06b734f..afa35fa 100644 --- a/docker/go-1.5.1/Dockerfile +++ b/docker/go-1.5.1/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 151 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=46eecd290d8803887dec718c691cc243f2175fe0 && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 151 diff --git a/docker/go-1.5.2/Dockerfile b/docker/go-1.5.2/Dockerfile index a3dd2f1..9fdcc27 100644 --- a/docker/go-1.5.2/Dockerfile +++ b/docker/go-1.5.2/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 152 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=cae87ed095e8d94a81871281d35da7829bd1234e && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 152 diff --git a/docker/go-1.5.3/Dockerfile b/docker/go-1.5.3/Dockerfile index 976cc1c..d1cec45 100644 --- a/docker/go-1.5.3/Dockerfile +++ b/docker/go-1.5.3/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 153 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53 && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 153 diff --git a/docker/go-1.5.4/Dockerfile b/docker/go-1.5.4/Dockerfile index 4584948..58dfd0e 100644 --- a/docker/go-1.5.4/Dockerfile +++ b/docker/go-1.5.4/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 154 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.4.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=a3358721210787dc1e06f5ea1460ae0564f22a0fbd91be9dcd947fb1d19b9560 && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 154 diff --git a/docker/go-1.6-develop/Dockerfile b/docker/go-1.6-develop/Dockerfile deleted file mode 100644 index e5e35d7..0000000 --- a/docker/go-1.6-develop/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# Go cross compiler (xgo): Go 1.6 develop layer -# Copyright (c) 2016 Péter Szilágyi. All rights reserved. -# -# Released under the MIT license. - -FROM karalabe/xgo-base - -MAINTAINER Péter Szilágyi - -# Clone and bootstrap the latest Go develop branch -RUN $BOOTSTRAP_REPO release-branch.go1.6 -ENV GO_VERSION 161 diff --git a/docker/go-1.6.0/Dockerfile b/docker/go-1.6.0/Dockerfile index 1299e54..0ce18b2 100644 --- a/docker/go-1.6.0/Dockerfile +++ b/docker/go-1.6.0/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 160 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=5470eac05d273c74ff8bac7bef5bad0b5abbd1c4052efbdbc8db45332e836b0b && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 160 diff --git a/docker/go-1.6.1/Dockerfile b/docker/go-1.6.1/Dockerfile index ffee01b..808915f 100644 --- a/docker/go-1.6.1/Dockerfile +++ b/docker/go-1.6.1/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 161 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.6.1.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=6d894da8b4ad3f7f6c295db0d73ccc3646bce630e1c43e662a0120681d47e988 && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 161 diff --git a/docker/go-1.6.2/Dockerfile b/docker/go-1.6.2/Dockerfile index 68f4199..48937c4 100644 --- a/docker/go-1.6.2/Dockerfile +++ b/docker/go-1.6.2/Dockerfile @@ -8,10 +8,10 @@ FROM karalabe/xgo-base MAINTAINER Péter Szilágyi # Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 162 + RUN \ export ROOT_DIST=https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz && \ export ROOT_DIST_SHA=e40c36ae71756198478624ed1bb4ce17597b3c19d243f3f0899bb5740d56212a && \ \ $BOOTSTRAP_PURE - -ENV GO_VERSION 162 diff --git a/docker/go-1.7beta1/Dockerfile b/docker/go-1.7beta1/Dockerfile new file mode 100644 index 0000000..b5393f9 --- /dev/null +++ b/docker/go-1.7beta1/Dockerfile @@ -0,0 +1,17 @@ +# Go cross compiler (xgo): Go 1.7beta1 +# Copyright (c) 2016 Péter Szilágyi. All rights reserved. +# +# Released under the MIT license. + +FROM karalabe/xgo-base + +MAINTAINER Péter Szilágyi + +# Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 170 + +RUN \ + export ROOT_DIST=https://storage.googleapis.com/golang/go1.7beta1.linux-amd64.tar.gz && \ + export ROOT_DIST_SHA=a55e718935e2be1d5b920ed262fd06885d2d7fc4eab7722aa02c205d80532e3b && \ + \ + $BOOTSTRAP_PURE