[Libclc-dev] [PATCH] Don't include <stddef.h>
dumbbell at FreeBSD.org
Fri Oct 17 15:51:58 PDT 2014
On 18.10.2014 00:41, Jeroen Ketema wrote:
>> Including a standard or system header isn't allowed in OpenCL.
> I’m not sure this is correct. Could you point me to the specific
> text that states this? In the OpenCL 1.2 spec I can only find is
> 6.9.f which does not mention stddef.h.
To be honest, I didn't read the specification thoroughly. The build of
libclc fails on FreeBSD if stddef.h is included, because a header pulled
by stddef.h defines variadic macros. Those macros are not supported by
OpenCL according to clang.
I then asked on the #llvm IRC channel how I could exclude those macros
when building an OpenCL program. I have been told the problem rather
comes from libclc which shouldn't include any standard or system C header.
I then removed that #include, defined size_t and it built.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 949 bytes
Desc: OpenPGP digital signature
More information about the Libclc-dev