Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clang ARM neon support

Tags:

clang

arm

neon

I just cross-compiled the clang compiler for ARM on my x86 machine with instructions from here. I am trying to compile a c code containing NEON intrinsics with clang compiler. It is giving error, (which i do not encounter with 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"

The line test.c:2 is #include arm_neon.h

like image 674
junaids Avatar asked Mar 14 '23 06:03

junaids


1 Answers

It will be the -mfloat-abi=soft. I'm surprised that works for you with an arm-none-linux-gnueabi toolchain.

For Neon support you will want to be targetting either the softfp, or hard float ABI, with either -mfloat-abi=softfp or -mfloat-abi=hard

like image 126
James Greenhalgh Avatar answered Mar 24 '23 14:03

James Greenhalgh