[LLVMdev] llvm-gcc cross compiler for ARM Linux failing

Bob Wilson bob.wilson at apple.com
Thu Jul 2 22:08:00 PDT 2009

On Jul 2, 2009, at 6:24 PM, Neel Nagar wrote:

> I suspect that my llvm-gcc cross compiler  is using the wrong
> assembler because it does not recognize "-mcpu=cortex-a8".

This is a known problem.  We've only added support for ARMv7  
(including cortex-a8) in llvm in the last week or so, and the  
associated changes for llvm-gcc are still pending.  Unless you need  
specific features of your cortex-a8 processor, you should be able to  
make progress getting things to work by specifying an older ARMv6  

> I was trying to build a cross compiler for a Mac host. Now I am trying
> to build on x86_64 Linux. I am targeting a Beagle board with an ARM
> Cortex-A8 and Angstrom Linux.
> TRIED: to use the script in llvm/utils/crosstool/ARM/build-install- 
> linux.sh
> I used the recommended version of CodeSourcery and the same SVN  
> revision.
> RESULT: llvm-gcc builds but when I try to use it I get "as:
> unrecognized option `-meabi=4'"
> TRIED: using the latest CodeSourcery 2009q1 and latest LLVM REV 74564
> RESULT: llvm-gcc failed to build with this error:
>   /tmp/ccVSwC0h.s:535: Error: selected processor does not support
> `strd r2,[r6]'
>   make[3]: *** [libgcc/./_udivmoddi4.o] Error 1
> TRIED: adding --with-cpu=cortex-a8    to configuration for llvm-gcc
> RESULT: llvm-gcc now builds but when I try to use it I get "as:
> unrecognized option `-mcpu=cortex-a8'"
> I suspect it is using the wrong assembler. But when I do llvm-gcc -v I
> can see it has:
>  --with-gnu-as=/home/neel/CodeSourcery/Sourcery_G++_Lite/bin/arm- 
> none-linux-gnueabi-as
> If I use that assembler directly I get an executable but  printf,
> fflush and others are UNDefined.
> I can compile programs using the CodeSourcery gcc toolchain just fine.
> I did not even have to install the runtime code on the Beagle Board.
> it just worked.
> Any suggestions?
> Has anyone recently built an LLVM cross compiler for ARM Linux?
> Thanks,
> Neel
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list