[LLVMdev] build errors while cross compiling llvm-gcc for ARM
sanjuchugh at gmail.com
Mon Jul 12 05:26:37 PDT 2010
Since, I cudn't get performance gain using llvm compiler, I've tried to use
gold linker instead of going through these following steps.
a) 'llvm-gcc -c -flo -O2' to generate the .bc files.
b) 'llvm-ld' to combine them into a single .bc. No, not a .so nor a .a.
c) 'llc' to turn your combined .bc into a .s
d) 'as' to turn your .s into a .o
I followed instructions from web page. http://llvm.org/docs/GoldPlugin.html
I configured linker with these paramters.
../src/configure --host=i686-pc-linux-gpu --build=i686-pc-linux-gpu
--target=armv7fl-montavista-linux-gnueabi --enable-gold --enable-plugins
--enable-lto --with-cpu=cortex-a8 --with-interwork --with-arch=armv7-a
--with-mode=arm --with-tune=cortex-a8 --with-fpu=vfp3
Did a make then.
But the code generated with ld-new is intel binary and not a ARM binary :(
ld-new libs a.o -o binary
./binary: ELF 32-bit LSB executable, intel 80386 version 1(SYSV) dynamically
linked (uses shared libs), for GNU/Linux 2.6.9 not stripped
Any idea Why is it so ? Hoping for a quick reply
On Mon, Jun 28, 2010 at 2:23 PM, Anton Korobeynikov <anton at korobeynikov.info
> > exactly
> Well, in general, there is no connection between the performance on
> x86 and on ARM.
> You can try to profile your code and find what causes the speedup on
> x86 and figure out the slowdowns on ARM.
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev