<div dir="ltr"><div><div>Sorry for being misleading - i've tried to build from new build directory and configure succeed! Probably previous errors were affected by previous build errors. So CC and CXX were identified correctly (clang) and configuration succeed:<br>
<br>asmirnov@vmb:~/llvm_cmake_build2$ PATH=/home/asmirnov/llvm_host_installed/bin:$PATH CC=clang CXX=clang++ cmake ../llvm -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/home/asmirnov/llvm_cmake_installed -DLLVM_TABLEGEN=/home/asmirnov/llvm_host_build/Release+Asserts/bin/llvm-tblgen -DCLANG_TABLEGEN=/home/asmirnov/llvm_host_build/Release+Asserts/bin/clang-tblgen -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-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'<br>
<br>-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) <br>-- Target triple: i686-pc-linux-gnu<br>-- Native target architecture is ARM<br>-- Threads enabled.<br>-- Doxygen disabled.<br>-- Building with -fPIC<br>
-- Constructing LLVMBuild project information<br>-- Targeting ARM<br>-- Clang version: 3.4<br>-- Configuring done<br>-- Generating done<br>-- Build files have been written to: /home/asmirnov/llvm_cmake_build2<br><br></div>
But make finished with error:<br><br>[  7%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o<br>[  7%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o<br>
[  7%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o<br>[  7%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o<br>
[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/SetTheory.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/TGValueTypes.cpp.o<br>
[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o<br>
[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o<br>[  9%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o<br>Linking CXX executable ../../bin/llvm-tblgen<br>
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>../../lib/libLLVMSupport.a: could not read symbols: File in wrong format<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>make: *** [all] Error 2<br>
<br></div>I've specified paths for tblgens for host system. Is it wrong?<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/29 Anton Smirnov <span dir="ltr"><<a href="mailto:dev@antonsmirnov.name" target="_blank">dev@antonsmirnov.name</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">clang and clang++ are on path and i checked it running "clang" and "clang++".<div>btw "clang++" is already symlinked to "clang". Is there any cmake log that i can send to let you know more details?</div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/29 Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>On 28 September 2013 20:55, Anton Smirnov <span dir="ltr"><<a href="mailto:dev@antonsmirnov.name" target="_blank">dev@antonsmirnov.name</a>></span> wrote:<br></div><div class="gmail_extra">
<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><span style="color:rgb(80,0,80)">-- The CXX compiler identification is unknown</span><br>


</div><div>-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++<br>-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- broken<br>CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):<br>



  The C++ compiler "/usr/bin/arm-linux-gnueabihf-g++" is not able to compile<br>  a simple test program.<br></div></div></div></blockquote><div><br></div></div><div>It looks like it didn't find clang++, but it did find clang, so maybe you need the symlink from clang++ to clang there to make it work. It should be there, no idea why it's not.</div>


<div><br></div><div>arm-linux-gnueabihf-g++ will not be able to compile a simple test program because CMake will try to execute it and it won't run (it's ARM).<span><font color="#888888"><br></font></span></div>
<span><font color="#888888"><div><br></div><div>--renato</div></font></span></div></div>
</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>