mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-01 02:27:49 +08:00
Merge pull request #2028 from bluca/update_ndk
Problem: Android CI NDK version and C++ ABI are outdated
This commit is contained in:
commit
dc40c95c47
@ -75,17 +75,17 @@ function android_build_env {
|
||||
|
||||
if [ -z "$ANDROID_NDK_ROOT" ]; then
|
||||
ANDROID_BUILD_FAIL+=("Please set the ANDROID_NDK_ROOT environment variable")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"/home/user/android/android-ndk-r9d\")")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"/home/user/android/android-ndk-r11c\")")
|
||||
fi
|
||||
|
||||
if [ -z "$TOOLCHAIN_PATH" ]; then
|
||||
ANDROID_BUILD_FAIL+=("Please set the TOOLCHAIN_PATH environment variable")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"/home/user/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin\")")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"/home/user/android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin\")")
|
||||
fi
|
||||
|
||||
if [ -z "$TOOLCHAIN_NAME" ]; then
|
||||
ANDROID_BUILD_FAIL+=("Please set the TOOLCHAIN_NAME environment variable")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"arm-linux-androideabi-4.8\")")
|
||||
ANDROID_BUILD_FAIL+=(" (eg. \"arm-linux-androideabi-4.9\")")
|
||||
fi
|
||||
|
||||
if [ -z "$TOOLCHAIN_HOST" ]; then
|
||||
@ -210,21 +210,21 @@ function _android_build_opts_process_cxx_stl {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
gnustl_shared_48)
|
||||
gnustl_shared_49)
|
||||
LIBS+=" -lgnustl_shared"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/include"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/include"
|
||||
case "${TOOLCHAIN_ARCH}" in
|
||||
arm)
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include"
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include"
|
||||
;;
|
||||
x86)
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include"
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include"
|
||||
;;
|
||||
mips)
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include"
|
||||
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips"
|
||||
CPPFLAGS+=" -I${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/include"
|
||||
;;
|
||||
*)
|
||||
ANDROID_BUILD_FAIL+=("Unknown combination for ANDROID_BUILD_CXXSTL and TOOLCHAIN_ARCH")
|
||||
|
@ -8,7 +8,7 @@ ANDROID_BUILD_DIR="$(pwd)"
|
||||
source ${ANDROID_BUILD_DIR}/android_build_helper.sh
|
||||
|
||||
# Choose a C++ standard library implementation from the ndk
|
||||
ANDROID_BUILD_CXXSTL="gnustl_shared_48"
|
||||
ANDROID_BUILD_CXXSTL="gnustl_shared_49"
|
||||
|
||||
# Set up android build environment and set ANDROID_BUILD_OPTS array
|
||||
android_build_env
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NDK_VER=android-ndk-r10e
|
||||
NDK_VER=android-ndk-r11c
|
||||
NDK_ABI_VER=4.9
|
||||
|
||||
if [ $TRAVIS_OS_NAME == "linux" ]
|
||||
then
|
||||
@ -13,17 +14,16 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export FILENAME=$NDK_VER-$NDK_PLATFORM.bin
|
||||
export FILENAME=$NDK_VER-$NDK_PLATFORM.zip
|
||||
|
||||
(cd '/tmp' \
|
||||
&& wget http://dl.google.com/android/ndk/$FILENAME \
|
||||
&& chmod a+x $FILENAME \
|
||||
&& ./$FILENAME &> /dev/null ) || exit 1
|
||||
&& wget http://dl.google.com/android/repository/$FILENAME \
|
||||
&& unzip $FILENAME &> /dev/null ) || exit 1
|
||||
unset FILENAME
|
||||
|
||||
export ANDROID_NDK_ROOT="/tmp/$NDK_VER"
|
||||
export TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/$NDK_PLATFORM/bin"
|
||||
export TOOLCHAIN_NAME="arm-linux-androideabi-4.8"
|
||||
export TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$NDK_ABI_VER/prebuilt/$NDK_PLATFORM/bin"
|
||||
export TOOLCHAIN_NAME="arm-linux-androideabi-$NDK_ABI_VER"
|
||||
export TOOLCHAIN_HOST="arm-linux-androideabi"
|
||||
export TOOLCHAIN_ARCH="arm"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user