Skip to content Skip to sidebar Skip to footer

No Qsort_r For Android (or How To Disable Force Thumb To Use Clz In Android Arm Code)

What I want to do (high-level): use qsort_r on Android. There is no default implementation. So I've grabbed one from BSD. Unfortunately it needs fls functions which is also unavail

Solution 1:

In your Android.mk file, here is how to set things up to compile thumb, arm and neon versions of your code. The assembly language source files need to have the "S" capitalized in the makefile, but the actual name doesn't need to be capitalized. The suffixes ".arm" and ".arm.neon" are only in the makefile and not part of the name (e.g. the files below are named main.c, main_asm.s, test.c and test_asm.s).

LOCAL_ARM_MODE := arm  # remove this if you want thumb mode
LOCAL_ARM_NEON := true # remove this if you want armv5 mode

# this flag will allow neon intrinsics in your C files
LOCAL_CFLAGS := -mfpu=neon -march=armv7

LOCAL_SRC_FILES := \
          main.c.arm \
          test.c.arm.neon \
          main_asm.S.arm \
          test_asm.S.arm.neon \

Post a Comment for "No Qsort_r For Android (or How To Disable Force Thumb To Use Clz In Android Arm Code)"