clang ARM 霓虹灯支持

clang ARM neon support

我刚刚使用此处的说明在我的 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-mfloat-abi=hard

以 softfp 或硬浮点 ABI 为目标