<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2015-03-29 3:33 GMT-05:00 Ed Schouten <span dir="ltr"><<a href="mailto:ed@80386.nl" target="_blank">ed@80386.nl</a>></span>:<br><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 id=":nh" class="" style="overflow:hidden">I am cross-compiling compiler-rt for my specific use-case. That said,<br>
I'm cross-compiling from x86-64 to x86-64, but for a different ABI.<br>
This is what I use:<br>
<br>
<a href="https://github.com/NuxiNL/cloudlibc/wiki/Building-runtime-libraries#user-content-compiler-rt" target="_blank">https://github.com/NuxiNL/cloudlibc/wiki/Building-runtime-libraries#user-content-compiler-rt</a><br>
<pre style="white-space:pre-wrap;color:rgb(0,0,0)">-DCMAKE_CROSSCOMPILING=True</pre>
As you can see, I'm using CMake. Works pretty well so far. Hopefully<br>
something like this will work for you as well?</div></blockquote></div><br>I tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++  -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi  -DCMAKE_CROSSCOMPILING=True". It will still build X86_64 version.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I also tried "cmake ../compiler-rt -DCMAKE_C_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=/usr/local/arm-2009q3/bin/arm-none-linux-gnueabi-g++  -DLLVM_NATIVE_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DTARGET_TRIPLE=armv-none-linux-gnueabi  -DCMAKE_CROSSCOMPILING=True</div><div class="gmail_extra">". the configure process generate errors: </div><div class="gmail_extra"> </div><div class="gmail_extra">CMake Error at cmake/config-ix.cmake:111 (message):</div><div class="gmail_extra">Cannot compile for x86_64:</div><div><br></div><div>It seems that the cmake only works for X86 target?</div><div><br></div><div>Thanks,</div><div>Chao</div></div>