disabled ccache for OSX debug builds

It isn't possible to set file:line breakpoints for binaries built
with ccache/clang and debugged with lldb, so let's disable ccache
when the user specifies --debug

Change-Id: I1df53a251882f6afcc2675312452a60767e5dbab
diff --git a/android-configure.sh b/android-configure.sh
index 42fe51d..3e13cc2 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -237,9 +237,16 @@
     fi
 fi  # IN_ANDROID_BUILD = no
 
-if [ -n "$CCACHE" -a -f "$CCACHE" ] ; then
-    CC="$CCACHE $CC"
-    log "Prebuilt   : CCACHE=$CCACHE"
+if [ -n "$CCACHE" -a -f "$CCACHE" ]; then
+    if [ "$HOST_OS" == "darwin" -a "$OPTION_DEBUG" == "yes" ]; then
+        # http://llvm.org/bugs/show_bug.cgi?id=20297
+        # ccache works for mingw/gdb, therefore probably works for gcc/gdb
+        log "Prebuilt   : CCACHE disabled for OSX debug builds"
+        CCACHE=
+    else
+        CC="$CCACHE $CC"
+        log "Prebuilt   : CCACHE=$CCACHE"
+    fi
 else
     log "Prebuilt   : CCACHE can't be found"
     CCACHE=