On 03/14/2017 11:25 PM, Michal Babej wrote:
> Hello,
>
>> However, I see that cross-compilation with compiler support does not
>> currently work. I'm wondering what the core technical blockers are
>> behind that and how much work it might be to get it working.
>
> Basically, instead of 2 compilers now (system and opencl kernel
> compiler) you would have to deal with 3 compilers. E.g. if you want to
> compile for ARM on x86-64, you'll need:
>
> 1) arm-whatever-gcc
> 2) llvm x86-64 (for compiling pocl's kernel library code on x86-64)
> 3) llvm arm
>
> The new compiler (3) is required because pocl has some code that links
> against LLVM, and you need to link it to target arch LLVM. It's not
> impossible to get done, just quite a bit of work. I've originally
> started cross-compilation work with this goal, but dropped it since
> non-LLVM builds were sufficient for us. Plus you'll need all the
> libraries (hwloc etc) for target, and pkg-config must recognize them and
> their versions.
>

Thanks; this is actually the path I went down. I got pocl to compile for 
the target arch (linking against the target LLVM), but the bitcode was 
still coming out native (so I had x86-64 bitcode on with an ARM version 
of pocl). Is there any deep reason why the bitcode could not be 
cross-compiled for the target arch as well? Or do you think it's purely 
some build logic that would need to be changed?

I imagine that if we cross-compile the bitcode, we would have to tell 
CMake as much as we know about the target CPU, arch, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to