• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5NDK_BUILDTOOLS_PATH=$NDK/build/tools
6. $NDK/build/tools/prebuilt-common.sh
7
8VERSION=4.6
9
10if [ -n "$NDK_TOOLCHAIN_VERSION" ];  then
11    case "$NDK_TOOLCHAIN_VERSION" in
12        4.4.3|4.6)
13           VERSION=$NDK_TOOLCHAIN_VERSION
14            ;;
15        clang*)
16           echo "No need to test clang on this issue"
17           exit 0
18            ;;
19        *)
20           echo "ERROR: invalid NDK_TOOLCHAIN_VERSION $NDK_TOOLCHAIN_VERSION"
21           exit 1
22    esac
23fi
24
25SYSTEM=$(get_prebuilt_host_tag)
26ARM_GPP=$NDK/toolchains/arm-linux-androideabi-$VERSION/prebuilt/$SYSTEM/bin/arm-linux-androideabi-g++
27
28OUT=$(echo "#include <stdarg.h>
29void foo(va_list v) { }" | $ARM_GPP -x c++ -c -o /dev/null - 2>&1)
30
31if [ -z "$OUT" ]; then
32  echo "ARM g++ no longer gives pointless warning about the mangling of <va_list> has changed in GCC 4.4"
33  exit 0
34else
35  echo "ERROR: ARM g++ still gives pointless warning about the mangling of <va_list> has changed in GCC 4.4"
36  exit 1
37fi
38