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

Neel Nagar neelnagar42 at gmail.com
Fri Jul 3 13:06:03 PDT 2009


Hello Anton,

Thanks for replying.

The message "as: unrecognized option `-mcpu=cortex-a8'"
is the same message I get when I just enter:

  as -mcpu=cortex-a8

So I think I llvm-gcc is using the Linux i386 assembler to assemble
ARM code. Not good.  What assembler is it supposed to use? The one in
CodeSourcery?

> But how's assembler actually called? Just try to compile something
> with extra -v option added

Did:   llvm-gcc -v simple.c
-------------------------------------------
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /home/neel/xllvm/build-xl/src/llvm-gcc-4.2/configure
--enable-languages=c,c++
--enable-llvm=/home/neel/xllvm/install-xl/llvm-project/x86_64-unknown-linux-gnu/arm-none-linux-gnueabi/llvm
--prefix=/home/neel/xllvm/install-xl/llvm-project/x86_64-unknown-linux-gnu/arm-none-linux-gnueabi/llvm-gcc-4.2
--program-prefix=llvm- --target=arm-none-linux-gnueabi
--with-cpu=cortex-a8
--with-gnu-as=/home/neel/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-as
--with-gnu-ld=/home/neel/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld
--with-sysroot=/home/neel/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5646) (LLVM build)
 /home/neel/xllvm/install-xl/llvm-project/x86_64-unknown-linux-gnu/arm-none-linux-gnueabi/llvm-gcc-4.2/libexec/gcc/arm-none-linux-gnueabi/4.2.1/cc1
-quiet -v simple.c -quiet -dumpbase simple.c -mcpu=cortex-a8 -auxbase
simple -version -o /tmp/ccWsERFx.s
ignoring nonexistent directory
"/home/neel/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/neel/xllvm/install-xl/llvm-project/x86_64-unknown-linux-gnu/arm-none-linux-gnueabi/llvm-gcc-4.2/lib/gcc/arm-none-linux-gnueabi/4.2.1/include
 /home/neel/xllvm/install-xl/llvm-project/x86_64-unknown-linux-gnu/arm-none-linux-gnueabi/llvm-gcc-4.2/lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/include
 /home/neel/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include
End of search list.
GNU C version 4.2.1 (Based on Apple Inc. build 5646) (LLVM build)
(arm-none-linux-gnueabi)
        compiled by GNU C version 4.1.2 20071124 (Red Hat 4.1.2-42).
GGC heuristics: --param ggc-min-expand=96 --param ggc-min-heapsize=131072
Compiler executable checksum: f4d5e7abe212ada5d54f7df3985c1fb4
 as -mcpu=cortex-a8 -meabi=4 -o /tmp/ccsbmdt5.o /tmp/ccWsERFx.s
as: unrecognized option `-mcpu=cortex-a8'
------------------------------------------

Thanks,
Neel

On Fri, Jul 3, 2009 at 5:40 AM, Anton
Korobeynikov<anton at korobeynikov.info> wrote:
> Hi, Neel
>
>> 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
> But how's assembler actually called? Just try to compile something
> with extra -v option added
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
> _______________________________________________
> 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