Hi, I've been working on combining LLVM, clang, the NetBSD standard C library, compiler-rt, QEMU, GDB, and GNU binutils as a cross compilation environment. My goal is to target small embedded systems, but I think that what I'm working on may be of interest to other LLVM/clang developers as I have been able to use the environment to fix several code generation issues in LLVM. As of today, I can compile non-trivial programs for ARM, i386, Mips, Microblaze, PowerPC, PowerPC64, and X86_64. These programs can be run with the modified NetBSD C library under QEMU in Linux user space emulation mode on my X86_64 Linux box. If anyone is interested in trying it out it is at http://ellcc.org. Some important notes: * I have built this on a X86_64 Linux system only. Linux is required to get the QEMU Linux user mode support. * The SVN checkout is huge, since it has everything mentioned above in it. * This is a work in progress: There are things that don't work. Not for the faint of heart! * It is fairly easy to build the complete package, see http://ellcc.org/installation.html and http://ellcc.org/targetsupport.html * Not all of the NetBSD standard library has been ported. There are a lot of system calls, etc. that have not been tested. I've been adding things as needed, not in any systematic way. * It is currently based on a fairly recent version of LLVM/clang: r122956. * Processor support is currently limited to those that are supported by QEMU, just because I wanted to have a common run/debug environment. Feel free to check it out. -Rich
Very cool! Thanks for the update, Richard. -Jim On Jan 17, 2011, at 2:30 AM, Richard Pennington wrote:> Hi, > > I've been working on combining LLVM, clang, the NetBSD standard C > library, compiler-rt, QEMU, GDB, and GNU binutils as a cross compilation > environment. My goal is to target small embedded systems, but I think > that what I'm working on may be of interest to other LLVM/clang > developers as I have been able to use the environment to fix several > code generation issues in LLVM. > > As of today, I can compile non-trivial programs for ARM, i386, Mips, > Microblaze, PowerPC, PowerPC64, and X86_64. These programs can be run > with the modified NetBSD C library under QEMU in Linux user space > emulation mode on my X86_64 Linux box. If anyone is interested in trying > it out it is at http://ellcc.org. > > Some important notes: > * I have built this on a X86_64 Linux system only. Linux is required to > get the QEMU Linux user mode support. > * The SVN checkout is huge, since it has everything mentioned above in it. > * This is a work in progress: There are things that don't work. Not for > the faint of heart! > * It is fairly easy to build the complete package, see > http://ellcc.org/installation.html and http://ellcc.org/targetsupport.html > * Not all of the NetBSD standard library has been ported. There are a > lot of system calls, etc. that have not been tested. I've been adding > things as needed, not in any systematic way. > * It is currently based on a fairly recent version of LLVM/clang: r122956. > * Processor support is currently limited to those that are supported by > QEMU, just because I wanted to have a common run/debug environment. > > Feel free to check it out. > > -Rich > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 17 January 2011 10:30, Richard Pennington <rich at pennware.com> wrote:> * It is currently based on a fairly recent version of LLVM/clang: r122956.This is great. I've noticed that you've made some fixes or additions that haven't made it upstream yet, such as the Microblaze parameter fix in rev 2337 (CCed Wesley Peck as he seems to have done a lot of work on the MBlaze stack code recently) and va_arg support for Microblaze in rev 2350. Do you intend to push such fixes upstream? Regards, Alex
Alex Bradbury wrote:> This is great. I've noticed that you've made some fixes or additions > that haven't made it upstream yet, such as the Microblaze parameter > fix in rev 2337 (CCed Wesley Peck as he seems to have done a lot of > work on the MBlaze stack code recently) and va_arg support for > Microblaze in rev 2350. Do you intend to push such fixes upstream?Hi Alex, I have been in contact with Wesley and he has been a great help. I believe I've sent him all my Microblaze fixes already. I do plan to push all the fixes upstream. I was planning to do it after I'd completed the library port, but since my day job has been consuming a lot of my time. I'll probably do it sooner. I was planning to sync with TOT this weekend, I'll start submitting fixes after that. -Rich