On 21 May 2013 18:22, Joseph S. Myers <jos...@codesourcery.com> wrote:
> On Tue, 21 May 2013, Ard Biesheuvel wrote:
>
>> I am currently exploring various ways of using NEON instructions in
>> kernel mode. One of the ways of doing so is using NEON intrinsics,
>> which we would like to support in the kernel, but unfortunately, at
>> the moment we can't because the support header arm_neon.h assumes C99
>> conformance and includes <stdint.h>. The kernel does not supply that
>> header.
>
> GCC, however, does, and for Linux targets it installs stdint-wrap.h which
> for freestanding builds includes stdint-gcc.h rather than depending on the
> C library to provide the header.  So as long as the kernel build uses
> -ffreestanding, it should not matter that the kernel doesn't have its own
> stdint.h.
>

I am aware of that. However, depending on whether your GCC was built
to target bare metal or glibc, the definition for uintptr_t that you
get as a bonus from including stdint-gcc.h (a type which arm_neon.h
itself does not require) conflicts with the one that the kernel
defines. (bare metal and the kernel both use unsigned long, whereas
glibc uses unsigned int) As it is quite customary to use a glibc
targeted GCC to build the kernel, I would like to avoid being the one
to introduce the restriction that only bare metal compilers can build
the kernel. (Note that the kernel does not define -ffreestanding by
default, although it mostly compiles fine with it)

-- 
Ard.

Reply via email to