Bug 747311 - autodetect android_toolchain on Android/x86. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 27 Apr 2012 14:45:38 +0900
changeset 92588 8eaab92b32206d90f2056fc7b19c77893b27419e
parent 92587 add831dc812ed83f807f6950765f434311f68d54
child 92589 21dcf77f7b1887acca45efff213cd546dc593202
child 92617 d871849ac3a36d0586e3c5ee0fedee89c0ab1a47
push id8759
push userm_kato@ga2.so-net.ne.jp
push dateFri, 27 Apr 2012 05:50:08 +0000
treeherdermozilla-inbound@8eaab92b3220 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs747311
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 747311 - autodetect android_toolchain on Android/x86. r=glandium
configure.in
js/src/configure.in
--- a/configure.in
+++ b/configure.in
@@ -395,17 +395,25 @@ case "$target" in
         AC_MSG_CHECKING([for android toolchain directory])
 
         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
-            android_toolchain="$android_ndk"/toolchains/arm-$kernel_name-androideabi-4.4.3/prebuilt/$kernel_name-x86
+            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
 
         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
     fi
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -386,17 +386,25 @@ case "$target" in
         AC_MSG_CHECKING([for android toolchain directory])
 
         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
-            android_toolchain="$android_ndk"/toolchains/arm-$kernel_name-androideabi-4.4.3/prebuilt/$kernel_name-x86
+            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
 
         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
     fi