Pre-bootstrap Android too. Hopefully it won't break.

This commit is contained in:
Péter Szilágyi 2015-09-17 18:47:31 +03:00
parent 1827c25933
commit e66e9575dc
2 changed files with 10 additions and 1 deletions

View File

@ -39,3 +39,10 @@ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 CC=o64-clang go install std
echo "Bootstrapping darwin/386..." echo "Bootstrapping darwin/386..."
GOOS=darwin GOARCH=386 CGO_ENABLED=1 CC=o32-clang go install std GOOS=darwin GOARCH=386 CGO_ENABLED=1 CC=o32-clang go install std
echo "Bootstrapping android/arm..."
ANDROID_SYSROOT=$ANDROID_NDK_ROOT/platforms/android-$ANDROID_PLATFORM/arch-arm
ANDROID_BINARIES=$ANDROID_NDK_ROOT/toolchains/$ANDROID_CHAIN_ARM/prebuilt/linux-x86_64/bin
PATH=$ANDROID_BINARIES:$PATH CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 \
CGO_CFLAGS="--sysroot=$ANDROID_SYSROOT" CGO_CXXFLAGS="--sysroot=$ANDROID_SYSROOT" CGO_LDFLAGS="--sysroot=$ANDROID_SYSROOT" go install std

View File

@ -100,6 +100,8 @@ for TARGET in $TARGETS; do
CGO_CCPIE="-fPIE" CGO_CCPIE="-fPIE"
CGO_LDPIE="-fPIE" CGO_LDPIE="-fPIE"
EXT_LDPIE="-extldflags=-pie" EXT_LDPIE="-extldflags=-pie"
else
unset CGO_CCPIE CGO_LDPIE EXT_LDPIE
fi fi
# Iterate over the requested architectures, bootstrap and # Iterate over the requested architectures, bootstrap and
if [ $XGOARCH == "." ] || [ $XGOARCH == "arm" ]; then if [ $XGOARCH == "." ] || [ $XGOARCH == "arm" ]; then
@ -107,7 +109,7 @@ for TARGET in $TARGETS; do
echo "Go version too low, skipping android-$PLATFORM/arm..." echo "Go version too low, skipping android-$PLATFORM/arm..."
else else
echo "Assembling toolchain for android-$PLATFORM/arm..." 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 $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
echo "Bootstrapping android-$PLATFORM/arm..." 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 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