How to generate so file for an android device (its architecture = "armeabi-v7a")

I want to deploy my model to an android device (arch = “armeabi-v7a”)
I set up TVM_NDK_CC=~/arm-linux-toolchain/bin/arm-linux-androideabi-gcc
and target = ‘llvm -target=armv7-none-linux-androideabi’.

However, I got the following error.

RuntimeError: Compilation error:
~/arm-linux-toolchain/bin/…/lib/gcc/arm-linux-androideabi/4.9.x/…/…/…/…/arm-linux-androideabi/bin/ld: error: /var/folders/15/81yfs4zj49bdkdy_dy3ky1pw4n07sv/T/tmpr61Npy/lib.o uses VFP register arguments, output does not
collect2: error: ld returned 1 exit status

After googling, it seems I should set up something like the following options.
CFLAGS=’-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16’

However, I don’t have idea on how to set up those option…
Also, I am sure the compiler has been created correctly as well.
I used the following command to make standalone toolchain.
./make-standalone-toolchain.sh --platform=android-22 --use-llvm --arch=arm --install-dir=~/arm-linux-toolchain

Anybody can advise me what to do for next, solutions for the error?

This is the code I have to make a *.so file.

target = ‘llvm -target=armv7-none-linux-androideabi’
dtype = ‘float32’

sym, arg_params, aux_params = mx.model.load_checkpoint(‘cnn_model_demo’, 0)

nnvm_sym, nnvm_params = nnvm.frontend.from_mxnet(sym, arg_params, aux_params)
graph, lib, params = nnvm.compiler.build(nnvm_sym, target=target, shape=input_dict, params=nnvm_params)

so_name = “android_lib.so”
temp = util.tempdir()
path_so = temp.relpath(so_name)
lib.export_library(so_name, ndk.create_shared)

Add “-mfloat-abi=soft” after the “-target=armv7a-linux-android”. See this for the detailed discussion.

Hi Ehsan,
I appreciate your help. Now it worked!!