我只是按照这里的说明在我的 x86 机器上交叉编译了 ARM 的 clang 编译器。我正在尝试使用 clang 编译器编译包含 NEON 内在函数的 c 代码。它给出了错误,(我没有遇到 arm-linux-gnueabi-gcc)$ clang -march=armv7-a -mfpu=neon -mfloat-abi=soft -integrated-as test.c -o test
In file included from test.c:2:
/home/junaid/llvm/build/Release+Asserts/bin/../lib/clang/3.2/include/arm_neon.h:28:2: error:
"NEON support not enabled"
行 test.c:2 是 #include arm_neon.h
最佳答案
它将是 -mfloat-abi=soft
.我很惊讶使用 arm-none-linux-gnueabi 工具链对您有用。
对于 Neon 支持,您需要使用 -mfloat-abi=softfp
来定位 softfp 或硬浮点 ABI。或 -mfloat-abi=hard
关于arm - clang ARM NEON 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35474573/