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>
Hello Per,> ...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.clang support for cross-compilation definitely requires alot of care. It the meantime you can forward a target triplet to clang via -ccc-host-triple hidden command line option. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
This worked quite well! Seems to me it definitely shouldn't be a hidden option. Compiling with the new (correct) triple, llvm has started taking the register arguments and putting them on the stack. Is there an easy way to stop this, or do I have to match/rebuild the dag somehow? //Per On Fri, Nov 26, 2010 at 10:14 AM, Anton Korobeynikov < anton at korobeynikov.info> wrote:> Hello Per, > > > ...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. > clang support for cross-compilation definitely requires alot of care. > It the meantime you can forward a target triplet to clang via > -ccc-host-triple hidden command line option. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101129/b2b6b537/attachment.html>