Update Android NDK to 11c.

This commit is contained in:
Péter Szilágyi 2016-05-01 16:44:21 +03:00
parent 52c3aeac29
commit 8e7fedaad3
2 changed files with 19 additions and 19 deletions

View File

@ -74,8 +74,8 @@ RUN \
rm -rf /iPhoneOS9.3.sdk.tar.bz2
# Configure the container for Android cross compilation
ENV ANDROID_NDK android-ndk-r10e
ENV ANDROID_NDK_PATH http://dl.google.com/android/ndk/$ANDROID_NDK-linux-x86_64.bin
ENV ANDROID_NDK android-ndk-r11c
ENV ANDROID_NDK_PATH http://dl.google.com/android/repository/$ANDROID_NDK-linux-x86_64.zip
ENV ANDROID_NDK_ROOT /usr/local/$ANDROID_NDK
ENV ANDROID_NDK_LIBC $ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9
ENV ANDROID_PLATFORM 21
@ -84,20 +84,20 @@ ENV ANDROID_CHAIN_ARM64 aarch64-linux-android-4.9
ENV ANDROID_CHAIN_386 x86-4.9
RUN \
$FETCH $ANDROID_NDK_PATH c685e5f106f8daa9b5449d0a4f21ee8c0afcb2f6 && \
7zr x `basename $ANDROID_NDK_PATH` \
"$ANDROID_NDK/build" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/include" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86" \
"$ANDROID_NDK/prebuilt/linux-x86_64" \
"$ANDROID_NDK/platforms/*/arch-arm" \
"$ANDROID_NDK/platforms/*/arch-arm64" \
"$ANDROID_NDK/platforms/*/arch-x86" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_ARM" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_ARM64" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_386" -o/usr/local > /dev/null && \
$FETCH $ANDROID_NDK_PATH de5ce9bddeee16fb6af2b9117e9566352aa7e279 && \
unzip `basename $ANDROID_NDK_PATH` \
"$ANDROID_NDK/build/*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi*/*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64*/*" \
"$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/*" \
"$ANDROID_NDK/prebuilt/linux-x86_64/*" \
"$ANDROID_NDK/platforms/*/arch-arm/*" \
"$ANDROID_NDK/platforms/*/arch-arm64/*" \
"$ANDROID_NDK/platforms/*/arch-x86/*" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_ARM/*" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_ARM64/*" \
"$ANDROID_NDK/toolchains/$ANDROID_CHAIN_386/*" -d /usr/local > /dev/null && \
rm -f `basename $ANDROID_NDK_PATH`
ENV PATH /usr/$ANDROID_CHAIN_ARM/bin:$PATH

View File

@ -176,7 +176,7 @@ for TARGET in $TARGETS; do
fi
echo "Assembling toolchain for android-$PLATFORM/arm..."
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_ARM --toolchain=$ANDROID_CHAIN_ARM --arch=arm --system=linux-x86_64 > /dev/null 2>&1
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_ARM --toolchain=$ANDROID_CHAIN_ARM --arch=arm > /dev/null 2>&1
echo "Bootstrapping android-$PLATFORM/arm..."
CC=arm-linux-androideabi-gcc GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go install std
@ -200,7 +200,7 @@ for TARGET in $TARGETS; do
else
if [ "$PLATFORM" -ge 9 ] && ([ $XGOARCH == "." ] || [ $XGOARCH == "386" ] || [ $XGOARCH == "aar" ]); then
echo "Assembling toolchain for android-$PLATFORM/386..."
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_386 --toolchain=$ANDROID_CHAIN_386 --arch=x86 --system=linux-x86_64 > /dev/null 2>&1
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_386 --toolchain=$ANDROID_CHAIN_386 --arch=x86 > /dev/null 2>&1
echo "Bootstrapping android-$PLATFORM/386..."
CC=i686-linux-android-gcc GOOS=android GOARCH=386 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go install std
@ -220,7 +220,7 @@ for TARGET in $TARGETS; do
fi
if [ "$PLATFORM" -ge 21 ] && ([ $XGOARCH == "." ] || [ $XGOARCH == "arm64" ] || [ $XGOARCH == "aar" ]); then
echo "Assembling toolchain for android-$PLATFORM/arm64..."
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_ARM64 --toolchain=$ANDROID_CHAIN_ARM64 --arch=arm64 --system=linux-x86_64 > /dev/null 2>&1
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh --ndk-dir=$ANDROID_NDK_ROOT --install-dir=/usr/$ANDROID_CHAIN_ARM64 --toolchain=$ANDROID_CHAIN_ARM64 --arch=arm64 > /dev/null 2>&1
echo "Bootstrapping android-$PLATFORM/arm64..."
CC=aarch64-linux-android-gcc GOOS=android GOARCH=arm64 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go install std