On 04/03/13 05:13, ext 高光磊 wrote:
> Hi,
>
>
> If i run cd lib/kernel/arm/&&  make, The errors will be as below
> /usr/local/bin/llvm-as -o barrier.bc ./../barrier.ll
> /usr/local/bin/clang -emit-llvm -c -target  -o get_work_dim.bc -x c

Here is the issue: the kernel target is not set. This should be set as 
'$host', but for some reason it set to the empty value. Therefore there 
is no attribute to 'clang -target', and the rest derails from there.
(yes, we should actually check that the OCL_KERNEL_TARGET is not empty 
in configure.ac...)

> Then I manually modified the lib/kernel/arm/Makefile, and many bc
> files will be generated.
>
>
> Remove '-target ${KERNEL_TARGET}' from Makefile. %.bc: %.c

> However, when I built OpenCL example, some errors occurred.
> /usr/local/bin/llvm-link: /usr/local/lib/pocl/arm/kernel-.bc: error:
> Invalid SWITCH record /usr/local/bin/llvm-link: error loading file

Removing the '-target' from clang causes it to build for its native 
target, i.e. in this case $build, which is x86. So your OpenCL kernel 
library seems to get some x86-specific stuff into it.


How to fix this? Difficult to say. Check what value OCL_KERNEL_TARGET 
gets in ./configure. Or, if it doesn't get any, why? (look at the switch 
in configure.ac, line 535, or put "sh -x" before "./configure" for some 
very verbose output).
Reading your config.log might give me some idea, too.


hth, and patches welcome ;)

kalle


-- 
But beware the debugger. Dark side of the source it is.
If once you start down the dark path, forever will it dominate
your destiny. Consume you it will.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to