<div>Hello,</div><div><br></div><div>With your kind concern and help, I now can make a binary for ARM target.</div><div><br></div><div>./clang -v --save-temps -ccc-host-triple arm-none-linux-gnueabi --sysroot=/home/hum/Documents/Projects/arm_toolchain/arm-2010.09/arm-none-linux-gnueabi/libc -gcc-toolchain /home/hum/Documents/Projects/arm_toolchain/arm-2010.09 hello.c -o hello
</div><div><br></div><div>The build command is shown above.</div><div><br></div><div>After that, I prepared an ARM laptop, AC100 - TOSHIBA.</div><div>I installed Ubuntu 12.04 in the way guided from the link below.</div><div>
<br></div><div><a href="https://wiki.ubuntu.com/ARM/TEGRA/AC100">https://wiki.ubuntu.com/ARM/TEGRA/AC100</a>
</div><div><br></div><div>So I moved the final binary from host PC to AC100 and executed.</div><div>But the binary DIDN'T RUN.</div><div><br></div><div>$./hello</div><div><br></div><div>returns an error message below.</div>
<div><br></div><div>bash: ./hello: No such file hello</div><div><br></div><div>I need to understand why it doesn't run on ARM laptop.</div><div><br></div><div>I compiled another sample program hi.c on the ARM laptop and compared both - the one cross compiled "hello" and the other self host compiled "hi".</div>
<div><br></div><div>Output message of utility "file" is almost the same except Linux version, one is 2.6.16 and the other is 2.6.31. But the output of "ldd" shows something meaningful.</div><div><br></div>
<div>ldd hi</div><div>    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6ecf000)</div><div>    /lib/ld-linux-armhf.so.3 (0xb6fc3000)</div><div><br></div><div>ldd hello</div><div>    not a dynamic executable</div>
<div><br></div><div><br></div><div>I guess I have to use a cross toolchain for my ARM target - AC 100. It has been equipped with Ubuntu 12.04.</div><div><br></div><div><br></div><div>Could you provide me any hint to analize this problem?</div>
<div><br></div><div>Thank you in advance.</div><div><br></div><div>Journeyer J. Joh</div><div><br></div><br><br><div class="gmail_quote">2012/6/21 Journeyer J. Joh <span dir="ltr"><<a href="mailto:oosaprogrammer@gmail.com" target="_blank">oosaprogrammer@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Joerg,<div><br></div><div>Thank you very much!</div><div><br></div><div>I finally found a working command string to cross-compile for ARM on x86.</div>
<div><br></div><div>./clang -v --save-temps -ccc-host-triple arm-none-linux-gnueabi --sysroot=/home/hum/Documents/Projects/arm_toolchain/arm-2010.09/arm-none-linux-gnueabi/libc -gcc-toolchain /home/hum/Documents/Projects/arm_toolchain/arm-2010.09 hello.c -o hello</div>

<div><br></div><div>Above works fine! Important options are</div><div><br></div><div>-ccc-host-triple arm-none-linux-gnueabi</div><div>--sysroot=/home/hum/Documents/Projects/arm_toolchain/arm-2010.09/arm-none-linux-gnueabi/libc</div>

<div>-gcc-toolchain /home/hum/Documents/Projects/arm_toolchain/arm-2010.09
</div><div><br></div><div>And the environment variable PATH doesn't need to be changed.</div><div><br></div><div>Thank you everyone who answered for my questions.</div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div>
Journeyer J. Joh</div>
</font></span><div><div><div class="h5"><br><div class="gmail_quote">2012/6/20 Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Wed, Jun 20, 2012 at 05:59:07PM +0900, Journeyer J. Joh wrote:<br>
> /home/hum/Documents/Projects/arm_toolchain/arm-2010.09/bin/arm-none-linux-gnueabi-ld<br>
<br>
Make sure the directory is in PATH, it will pick up LD automatically<br>
then.<br>
<span><font color="#888888"><br>
Joerg<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="im">-- <br><div>----------------------------------------</div><div>Journeyer J. Joh</div><div>o o s a p r o g r a m m e r</div><div>
a t</div><div>g m a i l  d o t  c o m</div>
<div>----------------------------------------</div><br>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>----------------------------------------</div><div>Journeyer J. Joh</div><div>o o s a p r o g r a m m e r</div><div>a t</div><div>g m a i l  d o t  c o m</div>
<div>----------------------------------------</div><br>