我找到了一个解决办法:
$ ln -s $NDK_PATH/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-as $NDK_PATH/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/libexec/gcc/arm-linux-androideabi/4.4.3/as
首先,我运行了建筑商, 并有选项显示正在执行的逗号 :
$ ndk-build -B V=1
这样我发现它如何执行编译器, 并传递相同的命令 来推进
strace arm-linux-androideabi-gcc -MMD -MP -MF ./obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Ijni -DANDROID -Wa,--noexecstack -O0 -g -I/home/aleck/Dev/Android/ndk/platforms/android-8/arch-arm/usr/include -c jni/hello-jni.c -o ./obj/local/armeabi/objs-debug/hello-jni/hello-jni.o
这表明,由于某种未知的原因,臂-linux-androideabi-gcc 使得按一种标准来搜索组装程序,但在此情况下,无效的名称代替臂-linux-androideabi as
stat64("/home/aleck/Dev/Android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../libexec/gcc/arm-linux-androideabi/4.4.3/as", 0xbfedea68) = -1 ENOENT (No such file or directory)
stat64("/home/aleck/Dev/Android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../libexec/gcc/as", 0xbfedea68) = -1 ENOENT (No such file or directory)
stat64("/home/aleck/Dev/Android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/arm-linux-androideabi/4.4.3/as", 0xbfedea68) = -1 ENOENT (No such file or directory)
stat64("/home/aleck/Dev/Android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/as", 0xbfedea68) = -1 ENOENT (No such file or directory)
vfork() = 6931
waitpid(6931, Assembler messages:
Fatal error: invalid -march= option: `armv5te
所以我做了一个软链接 命名为 最初它被预期的位置。