1# Check if ARM g++ no longer gives pointless warning about the mangling of <va_list> has changed in GCC 4.4 2# See https://android-review.googlesource.com/#/c/42274/ 3# 4 5export ANDROID_NDK_ROOT=$NDK 6 7NDK_BUILDTOOLS_PATH=$NDK/build/tools 8. $NDK/build/tools/prebuilt-common.sh 9 10VERSION=4.6 11 12if [ -n "$NDK_TOOLCHAIN_VERSION" ]; then 13 case "$NDK_TOOLCHAIN_VERSION" in 14 4.4.3|4.6|4.7*|4.8*|4.9*) 15 VERSION=$NDK_TOOLCHAIN_VERSION 16 ;; 17 clang*) 18 echo "No need to test clang on this issue" 19 exit 0 20 ;; 21 *) 22 echo "ERROR: invalid NDK_TOOLCHAIN_VERSION $NDK_TOOLCHAIN_VERSION" 23 exit 1 24 esac 25fi 26 27SYSTEM=$(get_prebuilt_host_tag) 28if [ "$SYSTEM" = "windows" ] ; then 29 SYSTEM64=windows-x86_64 30 NULL="NUL" 31else 32 SYSTEM64=${SYSTEM}_64 33 NULL="/dev/null" 34fi 35 36ARM_GPP=$NDK/toolchains/arm-linux-androideabi-$VERSION/prebuilt/$SYSTEM/bin/arm-linux-androideabi-g++${HOST_EXE} 37if [ ! -f "$ARM_GPP" ]; then 38 ARM_GPP=$NDK/toolchains/arm-linux-androideabi-$VERSION/prebuilt/$SYSTEM64/bin/arm-linux-androideabi-g++${HOST_EXE} 39fi 40if [ ! -f "$ARM_GPP" ]; then 41 echo "ERROR: Can't locate compiler $ARM_GPP" 42 exit 1 43fi 44 45OUT=$(echo "#include <stdarg.h> 46void foo(va_list v) { }" | $ARM_GPP -x c++ -c -o $NULL - 2>&1) 47 48if [ -z "$OUT" ]; then 49 echo "ARM g++ no longer gives pointless warning about the mangling of <va_list> has changed in GCC 4.4" 50 exit 0 51else 52 echo "ERROR: ARM g++ still gives pointless warning about the mangling of <va_list> has changed in GCC 4.4" 53 exit 1 54fi 55