My gcc version is 4.2.0, 32bit Linux and target is ARM
Configure options are:
./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
I get following errors:
/home/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc/xgcc
-B/home/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc/
-B/usr/local/armv7fl-montavista-linux-gnueabi/bin/
-B/usr/local/armv7fl-montavista-linux-gnueabi/lib/ -isystem
/usr/local/armv7fl-montavista-linux-gnueabi/include -isystem
/usr/local/armv7fl-montavista-linux-gnueabi/sys-include -DHAVE_CONFIG_H -I.
-I../.././libmudflap -I. -Wall -ffunction-sections -fdata-sections -O2 -g
-O2 --sysroot=/home//arm_v7_vfp_le/target/ -MT mf-runtime.lo -MD -MP -MF
.deps/mf-runtime.Tpo -c ../.././libmudflap/mf-runtime.c -o mf-runtime.o
>/dev/null 2>&1
make[4]: *** [mf-runtime.lo] Error 1
make[4]: Leaving directory
`/home//llvm-gcc-4.2-2.7.source/armv7fl-montavista-linux-gnueabi/libmudflap'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home//llvm-gcc-4.2-2.7.source/armv7fl-montavista-linux-gnueabi/libmudflap'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home//llvm-gcc-4.2-2.7.source/armv7fl-montavista-linux-gnueabi/libmudflap'
make[1]: *** [all-target-libmudflap] Error 2
make[1]: Leaving directory `/home//llvm-gcc-4.2-2.7.source'
make: *** [all] Error 2
Thanks a lot
Sanjeev
--
View this message in context: http://old.nabble.com/build-errors-while-cross-compiling-llvm-gcc-for-ARM-tp28778845p28778845.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Unfortunately, the only informative part of this compilation error was
hidden by the "> /dev/null 2>&1" redirection. Could you please remove
that redirection, re-run the build, and report the actual error message?
> /tmp/cczBL31y.s:409: rdhi, rdlo and rm must all be different
This is binutils bug fixed ~2 years ago:
http://sourceware.org/ml/binutils/2007-11/msg00046.html
Make sure you're using the latest binutils for ARM (from binutils CVS)
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hello,
Thanks for the reply. We have an product whose one part has lot of algorithms doing some graphics work. Our intention was to figure out if there can be any performance gain if we use llvm instead of native ARM. This is for ARM target. Earlier, I have built this component using llvm and tested it on x86. Performance was 4x as compared to native gcc. Then I built llvm for ARM and tested this component on ARM with llvm compiler and performance of llvm+arm against native ARM was almost equal or less :( However, I have run a simple sorting algorithms who run for 100K times and sort 10K elements on llvm+arm and this time it's performance was 3x better than native ARM. Can you guys please suggest what could be there in this graphics component which is not allowing the performance to improve for ARM+llvm.
cross-compiler has been built with these flags
Using built-in specs.
Target: armv7fl-montavista-linux-gnueabi
Configured with: ./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
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
These are the steps how I'm building library on ARM+llvm. generated .a is linked with other targets built with native arm compiler.
g++-cross -flto -O2 -Wall -function-sections -fdata-sections ; for all .cpps
llvm-ld -link-as-library *.bc target.bc // Consolidate all .bcs into one
llc target.bc -o target.s
cross-as target.s -o target.o
ar q target.a target.o
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
> Do you belive that older binaries of (linker & assembler) can cause performance drop ?
No. They are just buggy (at least assembler).
> Unfortunately I'm not in a position to update the arm compiler for my company :)
Well, sorry, then you're not lucky then. You should expect invalid
code / spurious error messages produced in many places (and you
already saw this!)
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
> Now our libraries which are either compiled with native ARM or with this
> llvm compiler gives same performance numbers. However this only llvm
> compiler if compared with x86 compiler gives huge performance gain.
You mean that llvm-generated code is faster on x86, but not on ARM compared
to the vendor compiler / gcc, right?
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
Is there a way to force the LLVM JIT compiler to omit the frame pointer in its generated i386/amd64 code? I've got a complex situation in which the stack can potentially be moved around so I'd prefer that the base pointer doesn't get pushed there.
Félix
I thought FPO is enabled by default (I explicitly disable it), but try setting:
llvm::NoFramePointerElim = false;
> 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
ld --version
and last few lines of the ld --help output
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
At least you are not telling ld-new to use any plugin. Thus ld-new
does not know how to deal with LLVM IR inside .o and you obtain:
>ld-new libs a.o -o binary
>a.o : incompatible object file
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
> /usr/lib/crti.o
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o
> -L/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0 -L/usr/local/lib -lgcc
> --as-needed -lgcc_s --no-as-needed -lc -lgcc -lpthread -lrt --as-needed
> -lgcc_s --no-as-needed /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtend.o
> /usr/lib/crtn.o a.o -o sanjeevtest
And you're using x86 libs. Surely you won't obtain ARM binary.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
> I'm using gold linker now to see if there can be any performance gain. Also
> using latest gcc version (4.4.4) and latest binutils.
Sorry, I misinformed you last time. The necessary fixes were *not*
pushed into the binutils 2.20.1 release. You should grab so-called
development snapshot (aka 2.20.51). Make sure it's recent (say, after
January 2010).
PS: Note that gold is currently not pretty much usable for ARM code.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University