arm-hisiv300-linux-g ++:错误:无法识别的命令行选项'-msse'

时间:2017-07-07 09:22:10

标签: cmake arm cross-compiling

我刚刚通过添加:

更改了CMakeLists.txt
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER   /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/bin/arm-hisiv300-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/bin/arm-hisiv300-linux-g++)

SET(CMAKE_FIND_ROOT_PATH  /opt/hisi-linux/x86-arm/arm-hisiv300-linux/)

不幸的是,我遇到了一个问题:

root@lzw-virtual-machine:/home/lzw/OpenFace/OpenFace/build# make
Scanning dependencies of target dlib
[  1%] Building CXX object lib/3rdParty/dlib/CMakeFiles/dlib.dir/include/dlib/base64/base64_kernel_1.o
arm-hisiv300-linux-g++: error: unrecognized command line option ‘-msse’
arm-hisiv300-linux-g++: error: unrecognized command line option ‘-msse2’
arm-hisiv300-linux-g++: error: unrecognized command line option ‘-msse3’

1 个答案:

答案 0 :(得分:1)

这些都是为SSE ​​SIMD处理单元提供各代x86指令集扩展的选项;它们不存在于ARM上,所以它们不会起作用......

检查您的构建系统是否能够基于CPU架构进行区分......