> There isn't one at the moment, ideally it should figure it out, but I haven't looked much into it - it may be that this isn't working yet.I should say that I'm still a bit confused: Is it possible to build for ARM CPUs now? 1/ from which hosts (x86-*-* ?) 2/ for which targets (arm-*-* ?) 3/ what are the supported tools for ARM targets: a/ llvm-gcc (gcc 4.2)? b/ dragonegg (gcc 4.5)? c/ clang? Thanks, Manu
Maybe I'm misunderstanding your question, but clang/llvm is different from gcc in that all targets are built in. There's no building a specific target version, like you have to do for binutils/gcc. On Sep 11, 2010, at 8:44 AM, Emmanuel Blot wrote:>> There isn't one at the moment, ideally it should figure it out, but I haven't looked much into it - it may be that this isn't working yet. > > I should say that I'm still a bit confused: Is it possible to build > for ARM CPUs now? > 1/ from which hosts (x86-*-* ?) > 2/ for which targets (arm-*-* ?) > 3/ what are the supported tools for ARM targets: > a/ llvm-gcc (gcc 4.2)? > b/ dragonegg (gcc 4.5)? > c/ clang? > > Thanks, > Manu > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevCameron Esfahani dirty at apple.com "The cake is a lie." Common wisdom
>> I should say that I'm still a bit confused: Is it possible to build >> for ARM CPUs now?Yes!>> 1/ from which hosts (x86-*-* ?)AFAIK, all all supported platforms (x86, x86_64, etc)>> 2/ for which targets (arm-*-* ?)Virtually all. As far as I could test, all major architectures (v4/v5/v6 + v7-A-R-M), although I'm still fighting with some Thumb code generation. Could be my old gcc/binutils version (that still doesn't even recognizes cortex-R4). You should check that yours is really new (at least 2010) if you want v7R support.>> 3/ what are the supported tools for ARM targets: >> a/ llvm-gcc (gcc 4.2)? >> b/ dragonegg (gcc 4.5)? >> c/ clang?I haven't tested dragonegg, but clang and llvm-gcc do the job. llvm-gcc seems to be more in sync with the ARM backend (for obvious reasons), but it's a nightmare to compile it to the ARM backend. Clang supports it out of the box. Please, do have in mind that the code generated is by no means super-optimized for each specific platform. There are some selected features (mostly cortex-A*), but most of the code is generic to the architecture or falls back to v4. So, if you're looking for great optimizations GCC does for your specific SoC, you might not find it in LLVM yet. -- cheers, --renato
> Virtually all. As far as I could test, all major architectures > (v4/v5/v6 + v7-A-R-M), although I'm still fighting with some Thumb > code generation.Not a big issue for me: targets are ARMv4 (ARM7) and ARMv5 (ARM9) "classic" CPUs - in ARM terminology. No cortex.> I haven't tested dragonegg, but clang and llvm-gcc do the job. > llvm-gcc seems to be more in sync with the ARM backend (for obvious > reasons), but it's a nightmare to compile it to the ARM backend. Clang > supports it out of the box.I've been able to build clang + llvm from the SVN repository. However my targets (arm-eabi) are relying on the "newlib" standard library. I'm not sure how to build the llvm-gcc backend so that it uses this library. I'm used to build GCC (4.x) toolchains with newlib, but how can I do the same with llvm-gcc ? It seems that clang attemps to find the header files from the host system dir, not from the target system dir, so I guess that I missed an important option ... somewhere. I've replaced the "arm-eabi-gcc" calls from my Makefiles with "clang -ccc-host-triple arm-eabi -ccc-gcc-name arm-eabi-gcc" but clang probably needs some other options (?) Thanks, Emmanuel.
Maybe Matching Threads
- [LLVMdev] Cross-compiling the ARM toolchain
- [LLVMdev] Cross-compiling the ARM toolchain
- [LLVMdev] Cross-compiling the ARM toolchain
- [LLVMdev] Customize Standard C Library Using LLVM (to support llvm backend optimization)
- [LLVMdev] Cross-compiling the ARM toolchain