Hi, Jason I guess Poki want to build LLVM for ARM and use LLVM library to do something, not just using LLVM to compile ARM binary. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
On Tue, May 10, 2011 at 8:31 PM, 陳韋任 <chenwj at iis.sinica.edu.tw> wrote:> Hi, Jason > > I guess Poki want to build LLVM for ARM and use LLVM library to > do something, not just using LLVM to compile ARM binary.Setting up a cross compile system is always more complicated than compiling natively. It is possible to do so (we do it here locally for PNaCl project, for example, going from X86 to ARM), but it requires setup for things like llvm-gcc, the target libc and other target libraries you are linking against... not to mention a cross compiling binutils, and its irritating to get "right" It might be easiest to buy a cheap ARM box and compile natively using ARM gcc... -jason> > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
2011/5/11 Jason Kim <jasonwkim at google.com>:> It is possible to do so (we do it here locally for PNaCl project, for > example, going from X86 to ARM), > but it requires setup for things like llvm-gcc, the target libc and > other target libraries you are linking against... > not to mention a cross compiling binutils, and its irritating to get "right"Hi Jason, I agree it's more difficult, what I don't agree is that it's ok to be more difficult... ;) James sent a patch to fix some issues on selecting the target (march/mcpu/mos) that should get most of it done until link time simply by running vanilla clang/LLVM (no need for the soon-to-be-deprecated llvm-gcc). Also, while the ELF writer is good enough for some basic code, it has problems with more complex C++ code, so one might need GAS to get there, but that's easy to fix (and you have been doing a good job at it). The main problem are the libraries and the linker, and that's an area that has been barely touched so far... But for that, if you just download CodeSourcery's pack, you should be fine. So, all in all, not that hard. ;) cheers, --renato