[LLVMdev] Cross compiling question

S. Bharadwaj Yadavalli bharadwajy at gmail.com
Fri Jan 30 10:27:02 PST 2009


I am trying to build a x86_64 to ARM cross compiler.

I configured, built and installed LLVM as follows:

$ ../../../src/llvm/configure
--with-llvmgccdir=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2
--enable-optimized --enable-jit --prefix=<llvm-root>/install/x86_64-arm/llvm
--target=arm-unknown-linux-gnueabi

$ make
$ make install

Then I configured gcc front end as follows:

$ ../../../src/llvm-gcc-4.2/configure
--prefix=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2
--program-prefix=llvm-x86_64-arm
--enable-llvm=<llvm-root>/install/x86_64-arm/llvm --enable-languages=c,c++
--disable-multilib --target=arm-unknown-linux-gnueabi

I get the following error:

exec: 2: -meabi=4: not found

while assembling ../../../../src/llvm-gcc-4.2/gcc/crtstuff.c

I found that execution of the command
 <llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/as

which is part of execution of the command

<llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/xgcc

is the resulting in this error. It turns out that this is a 2 line shell
script that exec's the arguments like thus:

#!/bin/sh
exec  "$@"

Where is the assembler that needs to be invoked? What do I need to do to get
the configuration find it?

What am I doing wrong?

Thanks for any help!

Bharadwaj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090130/e5e26c3b/attachment.html>


More information about the llvm-dev mailing list