<div dir="ltr"><div><div>Hey.<br></div>Executing cc and cxx in command line did not change error output:<br><br>asmirnov@vmb:~/llvm_cmake_build$ export PATH=/home/asmirnov/llvm_host_installed/bin:$PATH<br>asmirnov@vmb:~/llvm_cmake_build$ 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>
-- The CXX compiler identification is unknown<br>-- 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><br>  It fails with the following output:<br><br>   Change Dir: /home/asmirnov/llvm_cmake_build/CMakeFiles/CMakeTmp<br>
<br>  <br><br>  Run Build Command:/usr/bin/make "cmTryCompileExec1026959458/fast"<br><br>  /usr/bin/make -f CMakeFiles/cmTryCompileExec1026959458.dir/build.make<br>  CMakeFiles/cmTryCompileExec1026959458.dir/build<br>
<br>  make[1]: Entering directory<br>  `/home/asmirnov/llvm_cmake_build/CMakeFiles/CMakeTmp'<br><br>  /usr/bin/cmake -E cmake_progress_report<br>  /home/asmirnov/llvm_cmake_build/CMakeFiles/CMakeTmp/CMakeFiles 1<br><br>
  Building CXX object<br>  CMakeFiles/cmTryCompileExec1026959458.dir/testCXXCompiler.cxx.o<br><br>  /usr/bin/arm-linux-gnueabihf-g++ -target armv7a-linux-gnueabihf<br>  -mcpu=cortex-a9<br>  -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/<br>
  -I/usr/arm-linux-gnueabihf/include/ -mfloat-abi=hard -ccc-gcc-name<br>  arm-linux-gnueabihf-gcc -o<br>  CMakeFiles/cmTryCompileExec1026959458.dir/testCXXCompiler.cxx.o -c<br>  /home/asmirnov/llvm_cmake_build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx<br>
<br>  arm-linux-gnueabihf-g++: error: unrecognized command line option<br>  ‘-target’<br><br>  arm-linux-gnueabihf-g++: error: armv7a-linux-gnueabihf: No such file or<br>  directory<br><br>  arm-linux-gnueabihf-g++: error: unrecognized command line option<br>
  ‘-ccc-gcc-name’<br><br>  arm-linux-gnueabihf-g++: error: arm-linux-gnueabihf-gcc: No such file or<br>  directory<br><br>  make[1]: Leaving directory<br>  `/home/asmirnov/llvm_cmake_build/CMakeFiles/CMakeTmp'<br><br>
  make[1]: ***<br>  [CMakeFiles/cmTryCompileExec1026959458.dir/testCXXCompiler.cxx.o] Error 1<br><br>  make: *** [cmTryCompileExec1026959458/fast] Error 2<br><br>  <br><br>  <br><br>  CMake will not be able to correctly generate this project.<br>
<br></div>What can we do?<br><div><br></div></div><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 class="im">On 28 September 2013 19:29, 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 class="im">
<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">asmirnov@vmb:~/llvm_cmake_build$ CC=clang<br>

<div class="gmail_extra"><div class="gmail_quote"><div>asmirnov@vmb:~/llvm_cmake_build$ CXX=clang++<br></div></div></div></div></blockquote><div><br></div></div><div>Oh, no, you need to set them on the CMake line itself. And you may want to export the PATH (it's not necessary, you can use the full path on the CC/CXX variables):</div>

<div><br></div><div>$ export PATH=/home/asmirnov/llvm_host_installed/bin:$PATH</div><div>$ 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'</div>

<div><br></div><div>cheers,</div><div>--renato</div></div></div></div>
</blockquote></div><br></div>