<div dir="ltr"><div><div>Hi,</div><div><br></div><div>I am trying to cross compile LLVM-3.0 for Arm target i.e. I would like to run the LLVM tools on ARM platform and generate the code for the ARM platform. I configured the build with </div>
<div><br></div><div>../src/configure --build=i686-pc-linux-gnu --host=arm-linux-gnueabi --target=arm-linux-gnueabi --enable-optimized=no --prefix=/home/user/Acads/Compiler/LLVM/llvm-3.0/bin --with-as=/usr/bin/arm-linux-gnueabi-as --with-ld=/usr/bin/arm-linux-gnueabi-ld --with-ar=/usr/bin/arm-linux-gnueabi-ar</div>
<div><br></div><div>and then fire the build with </div><div>make -j4.</div><div><br></div><div>However following error occurs while doing the build,</div><div><br></div><div>make[2]: Entering directory `/home/user/Acads/Compiler/LLVM/llvm-3.0/build/tools/llvm-extract'</div>
<div>llvm[2]: Linking Debug executable llvm-extract</div><div><br></div><div>/usr/bin/ld: /home/user/Acads/Compiler/LLVM/llvm-3.0/build/Debug/lib/libLLVMSupport.a(regcomp.o): Relocations in generic ELF (EM: 40)</div><div>
/home/user/Acads/Compiler/LLVM/llvm-3.0/build/Debug/lib/libLLVMSupport.a: could not read symbols: File in wrong format</div><div>collect2: ld returned 1 exit status</div><div>make[2]: *** [/home/user/Acads/Compiler/LLVM/llvm-3.0/build/Debug/bin/llvm-extract] Error 1</div>
<div>make[2]: Leaving directory `/home/user/Acads/Compiler/LLVM/llvm-3.0/build/tools/llvm-extract'</div><div>make[1]: *** [llvm-extract/.makeall] Error 2</div><div>make[1]: Leaving directory `/home/user/Acads/Compiler/LLVM/llvm-3.0/build/tools'</div>
<div>make: *** [all] Error 1</div><div><br></div><div>------------------------------------------------------------------------------------------------------------------------------------------------------</div><div>Also, when I look into config.log, it shows configure statement two times -</div>
<div><br></div><div>Target: arm-linux-gnueabi</div><div>Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.5 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib</div>
<div>Thread model: posix</div><div><br></div><div>So here it has not configures host as arm-linux-gnueabi as specified by in the configure command. For the other time this statement occurs,</div><div><br></div><div>Target: i686-linux-gnu</div>
<div>Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu</div>
<div><br></div><div>In this case, the target is also configured as i686. </div><div><br></div><div>Please help.</div></div><div><br></div></div>