[LLVMdev] Generatin code for an ARM-LINUX machine

Misha Brukman brukman at gmail.com
Mon Jul 6 11:32:50 PDT 2009


2009/7/1 Juan Carlos Martinez Santos <juanc.martinez.santos at gmail.com>

> I used the snapshots for the latest stable version (70786), and I followed
> the instructions inside of README file (very clear!!!)
>
> However, when I ran the hello program, I get an unrecognized option
> message. Bellow are the details.
>
> ============================================
> jcmartin78 at jcmartin78-laptop:~/LLVM/my-test$ llvmc hello.c
> as: unrecognized option '-meabi=4'
> ============================================


Sorry, this was my fault.  I used the flags --with-gnu-{as,ld} instead of
--with-{as,ld} to specify paths to the cross assembler and linker, but it
turns out that the former pair of flags are boolean (i.e., telling GCC
whether the tools are GNU or not), and the latter are the ones that accept a
path.

So, llvm-gcc wasn't finding the correct cross-tool assembler and was using
/usr/bin/as instead, which doesn't support ARM, and hence doesn't accept
"-meabi=4".  I've fixed this in SVN.

The reason I didn't come across this issue is that I was using llvm-gcc
phase-by-phase (as you've found it works), instead of generating binaries
directly from llvm-gcc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090706/80291060/attachment.html>


More information about the llvm-dev mailing list