<div dir="ltr">Hello.<div><br></div><div>Similar question to what i asked few days ago but was not resolved. </div><div><br></div><div>I've followed guide (<a href="http://llvm.org/docs/HowToCrossCompileLLVM.html" target="_blank">http://llvm.org/docs/HowToCrossCompileLLVM.html</a>) step-by-step.</div>
<div>The only changes i've done is installed g++ package since i've received "no g++ found" on clear virtual machine (ubuntu 13.04_64).</div><div><br></div><div>First i've compiled for host (to use tblgens), then for ARM.</div>
<div>When cross-compiling for ARM (tried both ninja and autotools) i'm getting linker error:</div><div><br></div><div>Linking CXX executable ../../bin/llvm-tblgen<br>../../lib/libLLVMSupport.a: could not read symbols: File format not recognized<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make[2]: *** [bin/llvm-tblgen] Error 1<br>make[1]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2<br><br></div><div>Verbose output (make VERBOSE=1):<br>
<br>cd /home/asmirnov/llvm_arm_cmake_build/utils/TableGen && /usr/bin/cmake -E cmake_link_script CMakeFiles/llvm-tblgen.dir/link.txt --verbose=1<br>/usr/local/bin/clang++ -target armv7a-linux-gnueabihf -mcpu=cortex-a9 -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/ -I/usr/arm-linux-gnueabihf/include/ -mfloat-abi=hard -ccc-gcc-name arm-linux-gnueabihf-gcc -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fno-rtti -O3 -DNDEBUG CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/AsmWriterInst.cpp.o CMakeFiles/llvm-tblgen.dir/CallingConvEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/CodeEmitterGen.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenInstruction.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenMapTable.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenRegisters.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenSchedule.cpp.o CMakeFiles/llvm-tblgen.dir/CodeGenTarget.cpp.o CMakeFiles/llvm-tblgen.dir/DAGISelEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/DAGISelMatcherGen.cpp.o CMakeFiles/llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o CMakeFiles/llvm-tblgen.dir/DAGISelMatcher.cpp.o CMakeFiles/llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/DisassemblerEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/FastISelEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/SetTheory.cpp.o CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o CMakeFiles/llvm-tblgen.dir/TGValueTypes.cpp.o CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o -o ../../bin/llvm-tblgen -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/lib64 ../../lib/libLLVMTableGen.a ../../lib/libLLVMSupport.a -lrt -ldl -lpthread -lpthread <br>
../../lib/libLLVMSupport.a: could not read symbols: File format not recognized<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make[2]: *** [bin/llvm-tblgen] Error 1<br>make[2]: Leaving directory `/home/asmirnov/llvm_arm_cmake_build'<br>
make[1]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2<br>make[1]: Leaving directory `/home/asmirnov/llvm_arm_cmake_build'<br>make: *** [all] Error 2<br><br></div><div> Can it be walked-around by invocation without -L/lib64 ?</div>
<div><br></div><div>Anton</div><div><br></div></div>