• Uncategorized

About linux : Why-doesnt-the-linux-kernel-includestdinth-when-I-includearmneonh

Question Detail

When I want to add the header file arm_neon.h in the kernel code throws an error

gcc/linux-x86/arm/arm-none-linux-gnueabi-4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include/arm_neon.h:45:20: error: stdint.h: No such file or directory

but including the same file in the user space doesn’t do it.

From this reference,

NEON intrinsics

NEON intrinsics are also supported. However, as code using NEON intrinsics
relies on the GCC header <arm_neon.h>, (which #includes <stdint.h>), you should observe the following in addition to the rules above:

  • Compile the unit containing the NEON intrinsics with ‘-ffreestanding’ so GCC uses its builtin version of <stdint.h> (this is a C99 header which the kernel does not supply);
  • Include <arm_neon.h> last, or at least after <linux/types.h>

I’ve added the -ffreestanding option, but I still get the same error.

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.