<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">
I've followed Clang <a href="http://llvm.org/docs/HowToBuildOnARM.html" rel="nofollow" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(74,107,130);text-decoration:none">doc</a> to cross-compile Clang for ARM Linux machine (Android) on x86_64 ubuntu machine:</p>
<pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">./</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">configure </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">build</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">armv7l</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">unknown</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">linux</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">gnueabihf \
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">host</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">armv7l</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">unknown</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">linux</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">gnueabihf \
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">target</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">armv7l</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">unknown</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">linux</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">gnueabihf </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">with</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">cpu</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">cortex</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">a9 \
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">with</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">float</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">hard </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">with</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">abi</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">aapcs</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">vfp </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">with</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">fpu</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">neon \
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">enable</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">targets</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">arm </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">enable</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">optimized </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">enable</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">assertions </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">enable</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">static</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">disable</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">shared </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">--</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">prefix</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">home</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">asmirnov</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">llvm_arm_build_static</span></code></pre>
<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">
Then i did make & make install (no errors) and found here is <code style="margin:0px;padding:1px 5px;border:0px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">file libclang.so</code> output:</p>
<pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">asmirnov@vmb</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">:~/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">llvm_arm_build_static$ cd </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">./</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Release</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Asserts</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">lib
asmirnov@vmb</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">:~/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">llvm_arm_build_static</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Release</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">+</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Asserts</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">lib$ file </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">./</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">libclang</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">so
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">./</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">libclang</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">so</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">:</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ELF </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">32</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">bit LSB shared object</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Intel</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">80386</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> version </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">GNU</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">/</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Linux</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> dynamically linked</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">BuildID</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">[</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">sha1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">]=</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(128,0,0)">0xabf77b97daef0b9a6669d291400ffa4b6c98695c</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> not stripped</span></code></pre>
<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">
Why is it i386? Why is it dynamically linked? How can i achieve my goal?</p></div>