From 841783b7fe23fbe2a0dbb2ed21164bec4851687a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 3 Nov 2015 14:09:30 +0200 Subject: [PATCH] Update OSX SDK to 10.9 from 10.6. --- docker/base/Dockerfile | 10 ++++------ docker/base/build.sh | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index c0d24ce..6875a2e 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -29,16 +29,14 @@ RUN \ ln -s /usr/include/asm-generic /usr/include/asm # Configure the container for OSX cross compilation -ENV OSX_SDK_PATH https://github.com/trevd/android_platform_build2/raw/master/osxsdks10.6.tar.gz -ENV OSX_SDK MacOSX10.6.sdk +ENV OSX_SDK_PATH https://s3.amazonaws.com/andrew-osx-sdks/MacOSX10.9.sdk.tar.xz +ENV OSX_SDK MacOSX10.9.sdk RUN \ git clone https://github.com/tpoechtrager/osxcross.git && \ \ - $FETCH $OSX_SDK_PATH f526b4ae9806e8d31e3b094e3f004f8f160a3fad && \ - tar -xzf `basename $OSX_SDK_PATH` --strip-components 1 SDKs/$OSX_SDK && \ - tar -cjf /osxcross/tarballs/$OSX_SDK.tar.bz2 $OSX_SDK && \ - rm -rf `basename $OSX_SDK_PATH` $OSX_SDK && \ + $FETCH $OSX_SDK_PATH e2f01f6dc7611df4783d2adc279d15132f4e9851 && \ + mv `basename $OSX_SDK_PATH` /osxcross/tarballs/ && \ \ sed -i -e 's|-march=native||g' /osxcross/build_clang.sh /osxcross/wrapper/build.sh && \ UNATTENDED=yes OSX_VERSION_MIN=10.6 /osxcross/build.sh diff --git a/docker/base/build.sh b/docker/base/build.sh index e40ec37..2790990 100644 --- a/docker/base/build.sh +++ b/docker/base/build.sh @@ -181,13 +181,13 @@ for TARGET in $TARGETS; do # Check and build for OSX targets if ([ $XGOOS == "." ] || [ $XGOOS == "darwin" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]); then echo "Compiling for darwin/amd64..." - CC=o64-clang CXX=o64-clang++ HOST=x86_64-apple-darwin10 PREFIX=/usr/local $BUILD_DEPS /deps + CC=o64-clang CXX=o64-clang++ HOST=x86_64-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="-s $LD" -d ./$PACK CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="-s $LD" $R -o /build/$NAME-darwin-amd64$R ./$PACK fi if ([ $XGOOS == "." ] || [ $XGOOS == "darwin" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "386" ]); then echo "Compiling for darwin/386..." - CC=o32-clang CXX=o32-clang++ HOST=i386-apple-darwin10 PREFIX=/usr/local $BUILD_DEPS /deps + CC=o32-clang CXX=o32-clang++ HOST=i386-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="-s $LD" -d ./$PACK CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="-s $LD" -o /build/$NAME-darwin-386 ./$PACK fi