[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Journeyer J. Joh
oosaprogrammer at gmail.com
Wed Jun 20 19:22:02 PDT 2012
Hi Joerg,
Thank you very much!
I finally found a working command string to cross-compile for ARM on x86.
./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
Above works fine! Important options are
-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
And the environment variable PATH doesn't need to be changed.
Thank you everyone who answered for my questions.
Regards
Journeyer J. Joh
2012/6/20 Joerg Sonnenberger <joerg at britannica.bec.de>
> On Wed, Jun 20, 2012 at 05:59:07PM +0900, Journeyer J. Joh wrote:
> >
> /home/hum/Documents/Projects/arm_toolchain/arm-2010.09/bin/arm-none-linux-gnueabi-ld
>
> Make sure the directory is in PATH, it will pick up LD automatically
> then.
>
> Joerg
>
--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120621/a9a3a620/attachment.html>
More information about the llvm-dev
mailing list