Sanjeev chugh
2010-Jul-12 13:37 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
Sorry for not explaining well. After compiling with g++-cross g++-cross -c a.c I do link using this command /gold_binutils/build/gold/ld-new -plugin ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /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 On Mon, Jul 12, 2010 at 7:03 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> > Yes, I'm following this page only and did whatever is mentioned there. > It doesn't seem so. E.g. it contains the following line: > "The linker takes a -plugin option that points to the path of the > plugin .so file." > and > "Replace that with ld-new -plugin /path/to/libLLVMgold.so to test it out." > > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100712/f8033e13/attachment.html>
Anton Korobeynikov
2010-Jul-12 14:25 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
> ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr > -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.oOk, this way you're generating code for x86> /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 sanjeevtestAnd 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
Sanjeev chugh
2010-Jul-28 11:57 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
Hello, 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. But when I'm compiling llvm-gcc, I'm getting this error. /home/jal/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc/xgcc -B/home/jal/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc/ -B/usr/local/arm-v7a8-linux-gnueabi/bin/ -B/usr/local/arm-v7a8-linux-gnueabi/lib/ -isystem /usr/local/arm-v7a8-linux-gnueabi/include -isystem /usr/local/arm-v7a8-linux-gnueabi/sys-include -O2 -O2 -g -O2 --sysroot=/home/jal/VDLinux-armv7a8-toolchain/arm-v7a8-linux-gnueabi/libc -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../libdecnumber -I/home/jal/llvm-2.7/include -DL_mulsc3 -fvisibility=hidden -DHIDE_EXPORTS -c ../.././gcc/libgcc2.c -o libgcc/./_mulsc3.o /tmp/ccmyj0Hi.s: Assembler messages: /tmp/ccmyj0Hi.s:60: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:62: Error: bad instruction `vmrsvs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:71: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:76: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:83: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:87: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:105: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:109: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:112: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:118: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:125: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:130: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:136: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:146: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:158: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:161: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:167: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:171: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:186: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:190: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:193: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:199: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:206: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:211: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:217: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:222: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:236: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:240: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:244: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:248: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:252: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:256: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:260: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:264: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:269: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:274: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:280: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:285: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:291: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:296: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:302: Error: bad instruction `vmrs apsr_nzcv,fpscr' /tmp/ccmyj0Hi.s:308: Error: bad instruction `vmrs apsr_nzcv,fpscr' make[3]: *** [libgcc/./_mulsc3.o] Error 1 make[3]: Leaving directory `/home/jal/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/home/jal/llvm-gcc-4.2-2.7.source/host-i686-pc-linux-gnu/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/jal/llvm-gcc-4.2-2.7.source' make: *** [all] Error 2 Toolkit version is Configured with: /scratch/julian_vda8/2010q1-release-linux-lite/src/gcc-4.4-2010q1/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-v7a8-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --disable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='VDLinux ga-release 2010-06-30' --with-bugurlhttp://linux.sec.samsung.net/VDLinux/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-v7a8-linux-gnueabi/libc --with-build-sysroot=/scratch/julian_vda8/2010q1-release-linux-lite/install/arm-v7a8-linux-gnueabi/libc --with-gmp=/scratch/julian_vda8/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-v7a8-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian_vda8/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-v7a8-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/julian_vda8/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-v7a8-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/julian_vda8/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-v7a8-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian_vda8/2010q1-release-linux-lite/install/arm-v7a8-linux-gnueabi/bin --with-build-time-tools=/scratch/julian_vda8/2010q1-release-linux-lite/install/arm-v7a8-linux-gnueabi/bin --with-interwork --with-cpu=cortex-a8 --with-arch=armv7-a --with-mode=arm --with-tune=cortex-a8 --with-fpu=vfp3 --with-float=softfp Thread model: posix gcc version 4.4.1 (VDLinux ga-release 2010-06-30) And llvm-gcc configured with /configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=arm-v7a8-linux-gnueabi --enable-cross --with-sysroot=/home/jal/VDLinux-armv7a8-toolchain/arm-v7a8-linux-gnueabi/libc --with-build-sysroot=/home/jal/VDLinux-armv7a8-toolchain/arm-v7a8-linux-gnueabi/libc --enable-languages=c,c++ --with-as=/home/jal/VDLinux-armv7a8-toolchain/bin/arm-v7a8-linux-gnueabi-as --with-ld=/home/jal/VDLinux-armv7a8-toolchain/bin/arm-v7a8-linux-gnueabi-ld --enable-checking=release --disable-multilib --enable-llvm=/home/jal/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 --with-float=softfp --disable-bootstrap --disable-libmudflap --disable-libssp Thanks & Regards Sanjeev On Mon, Jul 12, 2010 at 7:55 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> > ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr > > -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o > Ok, this way you're generating code for x86 > > > /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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100728/f955364e/attachment.html>
Apparently Analagous Threads
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] Question about ARM/vfp/NEON code generation
- PR43374 - when should comparing NaN values raise a floating point exception?
- Register Number