[LLVMdev] build errors while cross compiling llvm-gcc for ARM

Sanjeev chugh sanjuchugh at gmail.com
Mon Jul 12 06:17:22 PDT 2010


my g++-cross was configured with following parameters:

./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu
--target=armv7fl-montavista-linux-gnueabi --enable-cross
--with-sysroot=/home/arm_v7_vfp_le/target/
--with-build-sysroot=/home/arm_v7_vfp_le/target/ --enable-shared
--enable-languages=c,c++ --with-as=/home/arm_v7_vfp_le/bin/arm_v7_vfp_le-as
--with-ld=/home/arm_v7_vfp_le/bin/arm_v7_vfp_le-ld --enable-checking=release
--disable-multilib --enable-llvm=/home/Desktop/Sanjeev/LLVM/llvm-2.7
--enable-clocale=gnu --with-cpu=cortex-a8 --with-interwork
--with-arch=armv7-a --with-mode=arm --with-tune=cortex-a8 --with-fpu=vfp3
--disable-bootstrap --disable-libmudflap --disable-libssp

But any file e.g. a.c compiled with g++-cross if I try to link using ld-new,
I get error
ld-new libs a.o -o binary
a.o : incompatible object file

ld-new works only with those objects which are compiled using native gcc but
doesn't work for cross-compiler gcc/arm.

On Mon, Jul 12, 2010 at 6:22 PM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> Hello
>
> > a) 'llvm-gcc -c -flo -O2' to generate the .bc files.
> How llvm-gcc was configured & compiled?
>
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100712/f582061b/attachment.html>


More information about the llvm-dev mailing list