- Code: Select all
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := linkage_arm
LOCAL_ARM_MODE := arm
APP_ABI := armeabi-v7a
TARGET_CPU_ABI := armeabi-v7a
LOCAL_SRC_FILES := linkage_arm.S
include $(BUILD_SHARED_LIBRARY)
One would think that this should be obvious to the builder that this is for ARM v7a only. However, when I run the build, it does the following:
- Code: Select all
Compile arm : linkage_arm <= /home/paul/workspace/HelloAndroid/jni/linkage_arm.S
/home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.o: In function `.A8':
/home/paul/bin/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc -I/home/paul/bin/android-ndk-r4b/build/platforms/android-8/arch-arm/usr/include -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I/home/paul/workspace/HelloAndroid/jni -DANDROID -Wa,--noexecstack -O2 -DNDEBUG -g -c -MMD -MP -MF /home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.o.d /home/paul/workspace/HelloAndroid/jni/linkage_arm.S -o /home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.o
As you can see, there are several flags in there which are wrong:
1) The "-march=armv5te" flag should be "-march=armv7-a" instead
2) The "-mthumb-interwork" flag should not be there at all
3) All the "-D__ARM_ARCH_5*" may be a problem (seems like these should not be there either)
I seriously can't figure out where these are coming from. Any ideas how to fix this?


