From ce77dce395ba96c62489f859030ede75b76849d7 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 22 May 2012 08:37:37 +0200 Subject: [PATCH] Bug 735223 - Drop support for ancient NDKs. r=ted --- configure.in | 52 ++++++++++++--------------------------------- js/src/configure.in | 52 ++++++++++++--------------------------------- 2 files changed, 26 insertions(+), 78 deletions(-) diff --git a/configure.in b/configure.in index 9e1a05e91a61..e5ef23bcba96 100644 --- a/configure.in +++ b/configure.in @@ -166,7 +166,7 @@ MOZ_ARG_WITH_STRING(android-ndk, MOZ_ARG_WITH_STRING(android-toolchain, [ --with-android-toolchain=DIR - location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0], + location of the android toolchain], android_toolchain=$withval) @@ -183,15 +183,9 @@ MOZ_ARG_WITH_STRING(android-sdk, MOZ_ARG_WITH_STRING(android-platform, [ --with-android-platform=DIR - location of platform dir, default NDK/build/platforms/android-5/arch-arm], + location of platform dir], android_platform=$withval) -MOZ_ARG_ENABLE_BOOL(android-libstdcxx, -[ --enable-android-libstdcxx - use GNU libstdc++ instead of STLPort for NDK >= 5], - MOZ_ANDROID_LIBSTDCXX=1, - MOZ_ANDROID_LIBSTDCXX= ) - case "$target" in arm-linux*-android*|*-linuxandroid*) android_tool_prefix="arm-linux-androideabi" @@ -199,9 +193,6 @@ arm-linux*-android*|*-linuxandroid*) i?86-*android*) android_tool_prefix="i686-android-linux" ;; -arm-android-eabi) - android_tool_prefix="arm-eabi" - ;; *) android_tool_prefix="$target_os" ;; @@ -317,20 +308,15 @@ case "$target" in kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"` - android_toolchain="$android_ndk"/build/prebuilt/$kernel_name-x86/arm-eabi-4.4.0 - - # With newer NDK, the toolchain path has changed. - if ! test -d "$android_toolchain" ; then - case "$target_cpu" in - arm) - target_name=arm-linux-androideabi-4.4.3 - ;; - i?86) - target_name=x86-4.4.3 - ;; - esac - android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 - fi + case "$target_cpu" in + arm) + target_name=arm-linux-androideabi-4.4.3 + ;; + i?86) + target_name=x86-4.4.3 + ;; + esac + android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 if test -d "$android_toolchain" ; then AC_MSG_RESULT([$android_toolchain]) @@ -342,12 +328,7 @@ case "$target" in if test -z "$android_platform" ; then AC_MSG_CHECKING([for android platform directory]) - android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu" - - # With newer NDK, the platform path has changed. - if ! test -d "$android_platform" ; then - android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_cpu" - fi + android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_cpu" if test -d "$android_platform" ; then AC_MSG_RESULT([$android_platform]) @@ -1601,14 +1582,7 @@ if test "$OS_TARGET" = "Android"; then fi if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then - if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then - if test ! -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a" ; then - AC_MSG_ERROR([Cannot find path to libstdc++ (NDK version >= 5?)]) - fi - STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include -D_GLIBCXX_PERMIT_BACKWARD_HASH" - STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH" - STLPORT_LIBS="-lstdc++" - elif test -e "$android_ndk/sources/cxx-stl/stlport/src/iostream.cpp" ; then + if test -e "$android_ndk/sources/cxx-stl/stlport/src/iostream.cpp" ; then if test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/" elif test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then diff --git a/js/src/configure.in b/js/src/configure.in index 82a0d4120189..aca189b5c4ea 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -158,7 +158,7 @@ MOZ_ARG_WITH_STRING(android-ndk, MOZ_ARG_WITH_STRING(android-toolchain, [ --with-android-toolchain=DIR - location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0], + location of the android toolchain], android_toolchain=$withval) @@ -175,22 +175,13 @@ MOZ_ARG_WITH_STRING(android-sdk, MOZ_ARG_WITH_STRING(android-platform, [ --with-android-platform=DIR - location of platform dir, default NDK/build/platforms/android-5/arch-arm], + location of platform dir], android_platform=$withval) -MOZ_ARG_ENABLE_BOOL(android-libstdcxx, -[ --enable-android-libstdcxx - use GNU libstdc++ instead of STLPort for NDK >= 5], - MOZ_ANDROID_LIBSTDCXX=1, - MOZ_ANDROID_LIBSTDCXX= ) - case "$target" in arm-linux*-android*|*-linuxandroid*) android_tool_prefix="arm-linux-androideabi" ;; -arm-android-eabi) - android_tool_prefix="arm-eabi" - ;; i?86-*android*) android_tool_prefix="i686-android-linux" ;; @@ -308,20 +299,15 @@ case "$target" in kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"` - android_toolchain="$android_ndk"/build/prebuilt/$kernel_name-x86/arm-eabi-4.4.0 - - # With newer NDK, the toolchain path has changed. - if ! test -d "$android_toolchain" ; then - case "$target_cpu" in - arm) - target_name=arm-linux-androideabi-4.4.3 - ;; - i?86) - target_name=x86-4.4.3 - ;; - esac - android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 - fi + case "$target_cpu" in + arm) + target_name=arm-linux-androideabi-4.4.3 + ;; + i?86) + target_name=x86-4.4.3 + ;; + esac + android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 if test -d "$android_toolchain" ; then AC_MSG_RESULT([$android_toolchain]) @@ -333,12 +319,7 @@ case "$target" in if test -z "$android_platform" ; then AC_MSG_CHECKING([for android platform directory]) - android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu" - - # With newer NDK, the platform path has changed. - if ! test -d "$android_platform" ; then - android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_cpu" - fi + android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_cpu" if test -d "$android_platform" ; then AC_MSG_RESULT([$android_platform]) @@ -1488,14 +1469,7 @@ fi if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then if test -z "$STLPORT_CPPFLAGS$STLPORT_LDFLAGS$STLPORT_LIBS"; then - if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then - if test ! -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a" ; then - AC_MSG_ERROR([Cannot find path to libstdc++ (NDK version >= 5?)]) - fi - STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include -D_GLIBCXX_PERMIT_BACKWARD_HASH" - STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH" - STLPORT_LIBS="-lstdc++" - elif test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a" ; then + if test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a" ; then STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport" STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/" STLPORT_LIBS="-lstlport_static"