[LLVMdev] Problems compiling for new back-end

Per Fagrell per.fagrell at coresonic.com
Fri Nov 26 00:41:22 PST 2010


Hello

I'm working on a new back-end for llvm, and we've run into a problem. As
soon as for example pointers are involved compilation fails, because the
front-end is running for x86_64, so the pointers are i64. Looking at
compiling llvm-gcc by hand I saw no easy way of adding a new back-end
(branches/release_28), so I went with clang (same release) and added the
appropriate parts to lib/Basic/Target.cpp. It now accepts -arch MYTARGET,
but if you use -emit-llvm (which we have to for the time being), it says:

clang: warning: argument unused during compilation: '-arch MYTARGET'

...and the output has the x86_64 triple and datalayout anyway. How are you
supposed to develop new back-ends if neither compiler can cross-compile?
Target is a DSP, so native compile is entirely impossible.

Thank you for your time
Per Fagrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101126/4fa7c428/attachment.html>


More information about the llvm-dev mailing list