Bug 756740 - Allow to build for mipsel with Android NDK r8. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 May 2012 08:40:32 +0200
changeset 96035 476ef20e85715d57911eed77170a57338f8474ed
parent 96034 b18288b53788546922ff9bed7496c063fe741685
child 96036 f60e0f7e3e6296bfe9f4573db10f1f4addec19ff
push idunknown
push userunknown
push dateunknown
reviewersted
bugs756740
milestone15.0a1
Bug 756740 - Allow to build for mipsel with Android NDK r8. r=ted
configure.in
js/src/configure.in
--- a/configure.in
+++ b/configure.in
@@ -188,16 +188,19 @@ MOZ_ARG_WITH_STRING(android-platform,
 
 case "$target" in
 arm-linux*-android*|*-linuxandroid*)
     android_tool_prefix="arm-linux-androideabi"
     ;;
 i?86-*android*)
     android_tool_prefix="i686-android-linux"
     ;;
+mipsel-*android*)
+    android_tool_prefix="mipsel-linux-android"
+    ;;
 *)
     android_tool_prefix="$target_os"
     ;;
 esac
 
 MOZ_ARG_WITH_STRING(gonk,
 [  --with-gonk=DIR
                location of gonk dir],
@@ -310,16 +313,19 @@ case "$target" in
 
         case "$target_cpu" in
         arm)
             target_name=arm-linux-androideabi-4.4.3
             ;;
         i?86)
             target_name=x86-4.4.3
             ;;
+        mipsel)
+            target_name=mipsel-linux-android-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])
         else
             AC_MSG_ERROR([not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain.])
         fi
@@ -330,16 +336,19 @@ case "$target" in
 
         case "$target_cpu" in
         arm)
             target_name=arm
             ;;
         i?86)
             target_name=x86
             ;;
+        mipsel)
+            target_name=mips
+            ;;
         esac
 
         android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
 
         if test -d "$android_platform" ; then
             AC_MSG_RESULT([$android_platform])
         else
             AC_MSG_ERROR([not found. You have to specify --with-android-platform=/path/to/ndk/platform.])
@@ -1582,16 +1591,19 @@ if test "$OS_TARGET" = "Android"; then
       ANDROID_CPU_ARCH=armeabi-v7a
       ;;
     arm-*)
       ANDROID_CPU_ARCH=armeabi
       ;;
     x86-*)
       ANDROID_CPU_ARCH=x86
       ;;
+    mips-*) # When target_cpu is mipsel, CPU_ARCH is mips
+      ANDROID_CPU_ARCH=mips
+      ;;
     esac
 fi
 
 if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; 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
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -180,16 +180,19 @@ MOZ_ARG_WITH_STRING(android-platform,
 
 case "$target" in
 arm-linux*-android*|*-linuxandroid*)
     android_tool_prefix="arm-linux-androideabi"
     ;;
 i?86-*android*)
     android_tool_prefix="i686-android-linux"
     ;;
+mipsel-*android*)
+    android_tool_prefix="mipsel-linux-android"
+    ;;
 *)
     android_tool_prefix="$target_os"
     ;;
 esac
 
 MOZ_ARG_WITH_STRING(gonk,
 [  --with-gonk=DIR
                location of gonk dir],
@@ -301,16 +304,19 @@ case "$target" in
 
         case "$target_cpu" in
         arm)
             target_name=arm-linux-androideabi-4.4.3
             ;;
         i?86)
             target_name=x86-4.4.3
             ;;
+        mipsel)
+            target_name=mipsel-linux-android-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])
         else
             AC_MSG_ERROR([not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain.])
         fi
@@ -321,16 +327,19 @@ case "$target" in
 
         case "$target_cpu" in
         arm)
             target_name=arm
             ;;
         i?86)
             target_name=x86
             ;;
+        mipsel)
+            target_name=mips
+            ;;
         esac
 
         android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
 
         if test -d "$android_platform" ; then
             AC_MSG_RESULT([$android_platform])
         else
             AC_MSG_ERROR([not found. You have to specify --with-android-platform=/path/to/ndk/platform.])
@@ -1468,16 +1477,19 @@ if test "$OS_TARGET" = "Android"; then
       ANDROID_CPU_ARCH=armeabi-v7a
       ;;
     arm-*)
       ANDROID_CPU_ARCH=armeabi
       ;;
     x86-*)
       ANDROID_CPU_ARCH=x86
       ;;
+    mips-*) # When target_cpu is mipsel, CPU_ARCH is mips
+      ANDROID_CPU_ARCH=mips
+      ;;
     esac
 fi
 
 if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
     if test -z "$STLPORT_CPPFLAGS$STLPORT_LDFLAGS$STLPORT_LIBS"; 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/"