Hello, Well, I recompiled the LLVM-gcc .../llvm-gcc4.2-2.6.source/configure --prefix=`pwd`/../install --program-prefix=llvm- --enable-llvm=/home/LLVM/llvm-2.6/ --enable-languages=c --disable-libssp --with-gnu-ld=/home/LLVM/llvm-gcc4.2-2.6.source/arm-elf-ld --with-gnu-as=/home/LLVM/llvm-gcc4.2-2.6.source/arm-elf-as --with-cpu=cortex-a8 --target=arm-elf Everything is OK, but when trying to compile a HelloWorld source it gives me the following error: llvm-gcc a.c a.c:1:19: error: stdio.h: No such file or directory a.c: In function ‘main’: a.c:4: warning: incompatible implicit declaration of built-in function ‘printf’ llvm-gcc -v a.c Using built-in specs. Target: arm-elf Configured with: ../llvm-gcc4.2-2.6.source/configure --prefix=/home/LLVM/obj/../install --program-prefix=llvm- --enable-llvm=/home/LLVM/llvm-2.6/ --enable-languages=c --disable-libssp --with-gnu-ld=/home/LLVM/llvm-gcc4.2-2.6.source/arm-elf-ld --with-gnu-as=/home/LLVM/llvm-gcc4.2-2.6.source/arm-elf-as --with-cpu=cortex-a8 --target=arm-elf Thread model: single gcc version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build) /home/LLVM/install/bin/../libexec/gcc/arm-elf/4.2.1/cc1 -quiet -v -iprefix /home/LLVM/install/bin/../lib/gcc/arm-elf/4.2.1/ -D__USES_INITFINI__ a.c -quiet -dumpbase a.c -mcpu=cortex-a8 -auxbase a -version -o /tmp/ccEs2CuD.s ignoring nonexistent directory "/home/LLVM/install/bin/../lib/gcc/arm-elf/4..2.1/../../../../arm-elf/sys-include" ignoring nonexistent directory "/home/LLVM/install/bin/../lib/gcc/arm-elf/4..2.1/../../../../arm-elf/include" ignoring duplicate directory "/home/LLVM/obj/../install/lib/gcc/arm-elf/4.2..1/include" ignoring nonexistent directory "/home/LLVM/obj/../install/lib/gcc/arm-elf/4..2.1/../../../../arm-elf/sys-include" ignoring nonexistent directory "/home/LLVM/obj/../install/lib/gcc/arm-elf/4..2.1/../../../../arm-elf/include" #include "..." search starts here: #include <...> search starts here: /home/LLVM/install/bin/../lib/gcc/arm-elf/4.2.1/include End of search list. GNU C version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build) (arm-elf) compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu4). GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=131072 Compiler executable checksum: 2099b8949ecdc7b9705c423e43d0f9c7 a.c:1:19: error: stdio.h: No such file or directory a.c: In function ‘main’: a.c:4: warning: incompatible implicit declaration of built-in function ‘printf’ Why those directories doesn't exist? Thanks for your help, Corina. P.S. I will recompile and run -v to see which version of assembler is called. --- On Sun, 1/17/10, Rafael Espindola <espindola at google.com> wrote: From: Rafael Espindola <espindola at google.com> Subject: Re: [LLVMdev] LLVM-gcc for ARM To: "corina s" <corina_fff at yahoo.com> Cc: llvmdev at cs.uiuc.edu, anton at korobeynikov.info Date: Sunday, January 17, 2010, 8:23 AM> llvm-gcc a.c > Assembler messages: > Fatal error: Invalid -march= option: `armv7-a' > > Any ideas?It is probably trying to use the wrong assembler. Run with -v and check.> > Thank you, > Corina >Cheers, -- Rafael Ávila de Espíndola -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100117/6d01bed0/attachment.html>
> llvm-gcc a.c > a.c:1:19: error: stdio.h: No such file or directory > a.c: In function ‘main’: > a.c:4: warning: incompatible implicit declaration of built-in function ‘printf’This is provided by libc. Do you have an ARM libc? You should configure llvm-gcc with --with-sysroot pointing to the libc install directory. If you are building from scratch, you have to *) Build binutils *) Build llvm-gcc *) Use that to build a libc (newlib, glibc, etc) *) Build a new llvm-gcc that can use that libc Cheers, -- Rafael Ávila de Espíndola
OK, thank you. Are there some pre-built X86 binaries for LLVM-gcc for ARM? It yes, where can I download from? Thank you, Corina --- On Sun, 1/17/10, Rafael Espindola <espindola at google.com> wrote: From: Rafael Espindola <espindola at google.com> Subject: Re: [LLVMdev] LLVM-gcc for ARM To: "corina s" <corina_fff at yahoo.com> Cc: llvmdev at cs.uiuc.edu, anton at korobeynikov.info Date: Sunday, January 17, 2010, 9:35 AM> llvm-gcc a.c > a.c:1:19: error: stdio.h: No such file or directory > a.c: In function ‘main’: > a.c:4: warning: incompatible implicit declaration of built-in function ‘printf’This is provided by libc. Do you have an ARM libc? You should configure llvm-gcc with --with-sysroot pointing to the libc install directory. If you are building from scratch, you have to *) Build binutils *) Build llvm-gcc *) Use that to build a libc (newlib, glibc, etc) *) Build a new llvm-gcc that can use that libc Cheers, -- Rafael Ávila de Espíndola -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100117/539d9e64/attachment.html>