Code review comment for lp:~schnetter/pocl/pocl

Revision history for this message
Kalle Raiskila (kraiskil) wrote :

On 07.12.2012 20:07, Erik Schnetter wrote:
> It turns out the problem was caused by the option "-target x86_64" in
> the kernel/x86_64 directory. This target architecture is incompatible
> with x86_64-apple-darwin12.2.1. Changing this to "-target @TARGET@"
> resolves the issue.

This is the crux of the matter. Why do we have a x86_64 kernel directory
(and all the other platforms too) if we don't use them?
Perhaps we should switch back to compiling these with the HOST/TARGET
flags, and not using a separate lib/kernel/HOST directory for the
basic/pthread devices?

Also note that 'clang -target @TARGET@' will break ARM :)
Could we have a specific, explicit value set in configure
(OCL_NATIVE_DEVICE_TARGET, or something of the sort)

This preferral of HOST over TARGET is, I think, mostly due to the
autoconf lingo. HOST is where the program will run, TARGET is the binary
format the program (if it is a compiler) will produce. In the case of
pocl, when HOST!=TARGET we need a separate device driver anyways (i.e.
TCE, SPU), and the TARGET and HOST variables are ignored. This then
means that it is easy to get confused, and I am happy if it would get
cleared up. So please add extensive comments in the code!

thanks,
kalle

« Back to merge proposal