I have firstly compiled clang for host builds and now using the clang for the host builds I am using the clang for target build using the following command
However the build beaks giving output ...
Check for working CXX compiler: /home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake/bin/clang++ -- broken
CMake Error at /u-blox/gallery/kitware/cmake/lin_32/2.8.12.1/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler
"/home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake/bin/clang++"
is not able to compile a simple test program.
Preprocessed source(s) and associated run script(s) are located at:
Extended Description
I have firstly compiled clang for host builds and now using the clang for the host builds I am using the clang for target build using the following command
cmake ../llvm/ -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/home/adal/clang_3.2_cross_arm/ -DLLVM_TABLEGEN=../build_cmake/bin/llvm-tblgen -DCLANG_TABLEGEN=../build_cmake/bin/clang-tblgen -DLLVM_DEFAULT_TARGET_TRIPLE=arm-none-eabi -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS='-target armv7r-none-eabi -I /home/adal/gcc-arm-none-eabi-4_8-2014q2/arm-none-eabi/include/ -mfloat-abi=hard -mfpu=vfpv3-d16 -ccc-gcc-name /home/adal/gcc-arm-none-eabi-4_8-2014q2/bin/arm-none-eabi-gcc -L ../build_cmake/lib/' -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
However the build beaks giving output ... Check for working CXX compiler: /home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake/bin/clang++ -- broken CMake Error at /u-blox/gallery/kitware/cmake/lin_32/2.8.12.1/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "/home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake/bin/clang++" is not able to compile a simple test program.
Preprocessed source(s) and associated run script(s) are located at:
clang-3: note: diagnostic msg: /tmp/testCXXCompiler-LKHaKf.cpp
clang++: /home/adal/Store/clang_3.2_source_build/clang_cross/llvm/tools/clang/lib/Driver/Driver.cpp:470: void clang::driver::Driver::generateCompilationDiagnostics(clang::driver::Compilation&, const clang::driver::Command*): Assertion `I != std::string::npos && "Expected to find -main-file-name"' failed.
0 clang++ 0x000000000240c490
1 clang++ 0x000000000240c1b6
2 libpthread.so.0 0x0000003b1f20eca0
3 libc.so.6 0x0000003b1e2302c5 gsignal + 53
4 libc.so.6 0x0000003b1e231d70 abort + 272
5 libc.so.6 0x0000003b1e229746 __assert_fail + 246
6 clang++ 0x00000000025f24d4 clang::driver::Driver::generateCompilationDiagnostics(clang::driver::Compilation&, clang::driver::Command const*) + 2448
7 clang++ 0x0000000001658aaf main + 3395
8 libc.so.6 0x0000003b1e21d9c4 __libc_start_main + 244
9 clang++ 0x0000000001656859
Stack dump:
Program arguments: /home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake/bin/clang++ -target arm-none-eabi -I /home/adal/gcc-arm-none-eabi-4_8-2014q2/arm-none-eabi/include/ -mfloat-abi=hard -mfpu=vfpv3-d16 -ccc-gcc-name /home/adal/gcc-arm-none-eabi-4_8-2014q2/bin/arm-none-eabi-gcc -L ../build_cmake/lib/ -o CMakeFiles/cmTryCompileExec1717709649.dir/testCXXCompiler.cxx.o -c /home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake_cross_ARM/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
make.exe[1]: *** [CMakeFiles/cmTryCompileExec1717709649.dir/testCXXCompiler.cxx.o] Aborted
make.exe[1]: Leaving directory `/home/adal/Store/clang_3.2_source_build/clang_cross/build_cmake_cross_ARM/CMakeFiles/CMakeTmp'
make.exe: *** [cmTryCompileExec1717709649/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!