1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-11 04:25:53 +00:00

Merge pull request #590 from Zillode/nocgo

Nocgo
This commit is contained in:
Felix Ableitner 2016-03-22 12:08:14 +01:00
commit b690ccbdec
3 changed files with 12 additions and 55 deletions

View file

@ -8,6 +8,3 @@
./make-go.bash 386
./make-syncthing.bash 386
./make-go.bash amd64
./make-syncthing.bash amd64

View file

@ -6,11 +6,6 @@ RESET=1
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -z "$ANDROID_NDK" ]; then
echo "Error: unspecified ANDROID_NDK"
exit 1
fi
if [ -z "$GOROOT_BOOTSTRAP" ]; then
# We need Go 1.4 to bootstrap Go 1.5
if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then
@ -28,35 +23,20 @@ fi
case "$1" in
arm)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=arm-linux-androideabi-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC_FOR_TARGET=${MYDIR}/build/ndk-arm/bin/arm-linux-androideabi-gcc
export CXX_FOR_TARGET=${MYDIR}/build/ndk-arm/bin/arm-linux-androideabi-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=arm
export GOARM=5
;;
386)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=x86-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC_FOR_TARGET=${MYDIR}/build/ndk-386/bin/i686-linux-android-gcc
export CXX_FOR_TARGET=${MYDIR}/build/ndk-386/bin/i686-linux-android-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=386
export GO386=387
;;
amd64)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=x86_64-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC_FOR_TARGET=${MYDIR}/build/ndk-amd64/bin/x86_64-linux-android-gcc
export CXX_FOR_TARGET=${MYDIR}/build/ndk-amd64/bin/x86_64-linux-android-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
;;
*)

View file

@ -6,44 +6,24 @@ RESET=1
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -z "$ANDROID_NDK" ]; then
echo "Error: unspecified ANDROID_NDK"
exit 1
fi
case "$1" in
arm)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=arm-linux-androideabi-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC=${MYDIR}/build/ndk-$1/bin/arm-linux-androideabi-gcc
export CXX=${MYDIR}/build/ndk-$1/bin/arm-linux-androideabi-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=arm
export GOARM=5
export TARGETDIR=${MYDIR}/libs/armeabi
;;
386)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=x86-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC_FOR_TARGET=${MYDIR}/build/ndk-$1/bin/i686-linux-android-gcc
export CXX_FOR_TARGET=${MYDIR}/build/ndk-$1/bin/i686-linux-android-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=386
export GO386=387
export TARGETDIR=${MYDIR}/libs/x86
;;
amd64)
if [ ! -d "${MYDIR}/build/ndk-$1" ]; then
sh ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=x86_64-4.9 --install-dir=${MYDIR}/build/ndk-$1
fi
export CC_FOR_TARGET=${MYDIR}/build/ndk-$1/bin/x86_64-linux-android-gcc
export CXX_FOR_TARGET=${MYDIR}/build/ndk-$1/bin/x86_64-linux-android-g++
export CGO_ENABLED=1
export GOOS=android
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
export TARGETDIR=${MYDIR}/libs/x86_64
;;