<div dir="ltr"><div>i've unpacked libLLVMSupport.a file and object files inside are ELF 32-bit, ARM. So it seems .obj files are compiled for host correctly and packed to .a correctly.<br><br></div><div>ld is taken from correct toolchain:<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><br></div>Any thoughts?<br></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">Can someone just compile clang for ARM and for x86 (not x86_64) linux (Android to be more detailed), link statically and strip? i will be very thankful.<div>It seems that a bunch of different unexpected problems.. </div>

</div><div class="HOEnZb"><div class="h5"><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"><div>Not sure it is the reason - according to output clang and clang++ (symlinked to clang) is identified:<br><br>-- The C compiler identification is Clang 3.4.0<br>-- The CXX compiler identification is Clang 3.4.0<br>


-- Check for working C compiler: /home/asmirnov/llvm_installed/bin/clang<br>-- Check for working C compiler: /home/asmirnov/llvm_installed/bin/clang -- works<br>-- Detecting C compiler ABI info<br>-- Detecting C compiler ABI info - done<br>


-- Check for working CXX compiler: /home/asmirnov/llvm_installed/bin/clang++<br>-- Check for working CXX compiler: /home/asmirnov/llvm_installed/bin/clang++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>


-- Looking for C++ include cxxabi.h<br>-- Looking for C++ include cxxabi.h - found<br><br><br></div>I have tried with -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER vars - the same error.<br></div><div><div>
<div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/9/29 Anton Korobeynikov <span dir="ltr"><<a href="mailto:anton@korobeynikov.info" target="_blank">anton@korobeynikov.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>> It looks like it didn't find clang++, but it did find clang, so maybe you<br>
> need the symlink from clang++ to clang there to make it work. It should be<br>
> there, no idea why it's not.<br>
><br>
> arm-linux-gnueabihf-g++ will not be able to compile a simple test program<br>
> because CMake will try to execute it and it won't run (it's ARM).<br>
</div>cmake seems does not honor CC / CXX env. variables. The "hard way" to<br>
specify C/C++ compiler there is via -DCMAKE_C_COMPILER=clang<br>
-DCMAKE_CXX_COMPILER=clang++<br>
<br>
Also, I remember that some versions of cmake had bug, where it used<br>
clang as C compiler and something else as C++ compiler. Something like<br>
<a href="http://www.cmake.org/Bug/view.php?id=13505" target="_blank">http://www.cmake.org/Bug/view.php?id=13505</a><br>
<span><font color="#888888">--<br>
With best regards, Anton Korobeynikov<br>
Faculty of Mathematics and Mechanics, Saint Petersburg State University<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>