When updating Luajit2.1beta2 today, compiling Android has been an error.
/applications/xcode.app/contents/developer/usr/bin/make-c Srcmake[1]:/users/apple/android/android-ndk-r10c// Toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-clang:command not foundmake[1]:/Users/apple/ Android/android-ndk-r10c//toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-clang:command not FOUNDMAKE[1]:/users/apple/android/android-ndk-r10c//toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/ I686-linux-android-clang:command not foundmake[1]:/users/apple/android/android-ndk-r10c//toolchains/x86-4.9/ Prebuilt/darwin-x86_64/bin/i686-linux-android-clang:command not foundmake[1]:/users/apple/android/ Android-ndk-r10c//toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-clang:command not foundmake[1 ]:/users/apple/android/android-ndk-r10c//toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/ I686-linux-android-clang:command not foundmakefile:264: * * * unsupported target architecture. Stop.make: * * * [default] Error 2
Reading the most src/makefile found added to this sentence
Ifeq (windows,$ (findstring windows,$ (OS)) $ (msystem) $ (term)) host_sys= Windows host_rm= delelse host_ Sys:= $ (Shell uname-s) Ifneq (, $ (findstring mingw,$ (Host_sys))) host_sys= Windows host_msys= MINGW endif Ifneq (, $ (findstring cygwin,$ (Host_sys))) host_sys= Windows host_msys= CYGWIN endif # Use Clang for OSX host. Ifeq (darwin,$ (Host_sys)) default_cc= clang endifendif
Compile the default clang under Mac, NDK is no I686-linux-android-clang,
Modified to the default GCC made a judgment
# Use Clang for OSX host. Ifeq (darwin,$ (Host_sys)) Ifneq (Linux, $ (target_sys)) default_cc= clang endif endif
Paste the Luajit compilation code
#!/bin/shdir= "$ (CD" $ (dirname "${bash_source[0"} ")" && pwd) "Host_os= ' uname-s | TR "[: Upper:]" "[: Lower:]" ' srcdir= $DIR/srccd "$SRCDIR" ndk= $NDK _rootndkabi=8ndkver= $NDK/toolchains/ arm-linux-androideabi-4.9ndkp= $NDKVER/prebuilt/${host_os}-x86_64/bin/arm-linux-androideabi-ndkf= "--sysroot $NDK /platforms/android-$NDKABI/arch-arm "# Android/arm, Armeabi (ARMv5TE soft-float), Android 2.2+ (Froyo) destdir= $DIR/ Prebuilt/android/armeabirm "$DESTDIR"/*.amake cleanmake host_cc= "Gcc-m32" cross= $NDKP target_sys=linux TARGET_FLAGS= "$NDKF" if [-f $SRCDIR/src/libluajit.a]; Then MV $SRCDIR/src/libluajit.a $DESTDIR/libluajit.afi;# android/arm, armeabi-v7a (ARMv7 VFP), Android 4.0+ (ICS) Ndkarc H= "-march=armv7-a-mfloat-abi=softfp-wl,--fix-cortex-a8" destdir= $DIR/prebuilt/android/armeabi-v7arm "$DESTDIR"/* . Amake cleanmake host_cc= "Gcc-m32" cross= $NDKP target_sys=linux target_flags= "$NDKF $NDKARCH" if [-F $SRCDIR/src/ LIBLUAJIT.A]; Then MV $SRCDIR/src/libluajit.a $DESTDIR/libluajit.afi;# anDroid/x86, x86 (i686 SSE3), Android 4.0+ (ICS) ndkabi=18destdir= $DIR/prebuilt/android/x86ndkver= $NDK/toolchains/ x86-4.9ndkp= $NDKVER/prebuilt/${host_os}-x86_64/bin/i686-linux-android-ndkf= "--sysroot $NDK/platforms/android-$ Ndkabi/arch-x86 "rm" $DESTDIR "/*.amake cleanmake host_cc=" Gcc-m32 "cross= $NDKP target_sys=linux target_flags=" $NDKF " If [-f $SRCDIR/src/libluajit.a]; Then MV $SRCDIR/src/libluajit.a $DESTDIR/libluajit.afi;make Clean
Mac platform under Luajit-2.1.0-beta2 compiled Android I686-linux-android-clang:command not found