aarch64-linux-android-gcc: error: unrecognized command line option '-mfloat-abi=softfp'

问题

ERROR: /home/user1/new/tensorflow/tensorflow/contrib/lite/kernels/internal/BUILD:368:1: C++ compilation of rule '//tensorflow/contrib/lite/kernels/internal:neon_tensor_utils' failed (Exit 1)
aarch64-linux-android-gcc: error: unrecognized command line option '-mfloat-abi=softfp'
Target //tensorflow/contrib/lite/java:libtensorflowlite_jni.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 158.981s, Critical Path: 99.60s
INFO: 26 processes: 26 local.
FAILED: Build did NOT complete successfully

解决方法

cd tensorflow/tensorflow/contrib/lite/kernels/internal

修改BUILD文件

HARD_FP_FLAGS_IF_APPLICABLE = select({
    "//tensorflow:android_arm": ["-O3",],
    "//tensorflow:android_arm64": ["-O3",],
    "//tensorflow:android_armeabi": ["-O3",],
    "//conditions:default": [],
})

参考链接https://stackoverflow.com/questions/29851128/gcc-arm64-aarch64-unrecognized-command-line-option-mfpu-neon

你可能感兴趣的:(aarch64-linux-android-gcc: error: unrecognized command line option '-mfloat-abi=softfp')