When I provide clBuildProgram a long list of options, such as -D xxx=yyy, the OpenCL compiler seems to crash
in AMD-APP version 831.4 it segfaulted (centos 6.3 64bit)
in version 1113 it hanged.
I narrowed down the problem to the attached testcase file. It can be reproduced easily by commenting out the long buildOptions string.
The build options aren't actually related to the kernel itself (the kernel doesn't use any of them).
As a workaround, converting most of the -D options to #defines managed to get it compiling.
Is there such a limit of maximum number of compiler options?