[Android] Use gcc 4.7 with NDK r8d

Rafaël Carré git at videolan.org
Sun Dec 30 18:46:30 CET 2012


vlc-ports/android | branch: master | Rafaël Carré <funman at videolan.org> | Sun Dec 30 18:42:47 2012 +0100| [c21d6a9af239a280401f3050d1a617a555a05049] | committer: Rafaël Carré

Use gcc 4.7 with NDK r8d

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c21d6a9af239a280401f3050d1a617a555a05049
---

 compile.sh |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/compile.sh b/compile.sh
index 24498c0..ecd91a1 100755
--- a/compile.sh
+++ b/compile.sh
@@ -16,10 +16,17 @@ fi
 REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)
 case "$REL" in
     8?)
-        # NDK >= v8b, both 4.4.3 and 4.6 available,
-        # we use 4.6 because 4.4.3 doesn't handle threads correctly.
-        GCCVER=4.6
-        CXXSTL="/4.6"
+        # we don't use 4.4.3 because it doesn't handle threads correctly.
+        # TODO : clang?
+        if test -d ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.7
+        # if gcc 4.7 is present, it's there for all the archs (x86, mips, arm)
+        then
+            # since r8d
+            GCCVER=4.7
+        else
+            GCCVER=4.6
+        fi
+        CXXSTL="/"${GCCVER}
     ;;
     7|8|*)
         echo "You need the NDKv8b or later"



More information about the Android mailing list