[LLVMdev] Using LLVM as a crosscompiler

Lauro Ramos Venancio lauro.venancio at gmail.com
Sun Apr 1 14:33:17 PDT 2007


Hi Koen,

The process to build llvm-gcc as a crosscompiler is basically the same
as build a normal gcc as crosscompiler. The differences: you need a
LLVM installed (compiled for the host). You must configure llvm-gcc
with --enable-llvm.

Problems:
- Today LLVM supports ARM/EABI, but llvm-gcc don't. You must apply the patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046070.html
(Please someone commit this patch!)
- If your host system libraries are newer then gcc 4.0, you must
configure llvm-gcc with "--disable-shared" (this is a workaround for a
bug)


It would be great to have llvm-gcc inside OpenEmbedded. The Mamona
project could be the first Linux distribution totally compiled by
llvm-gcc!

Lauro

2007/4/1, Koen Kooi <koen at dominion.kabel.utwente.nl>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Anton Korobeynikov schreef:
> > Hello, Koen.
> >
> >> So my question is: How should I build llvm and llvm-gcc4 to have it cross-compile from x86
> >> to ARM/EABI?
> > Well, just supply appropriate --host/--target options to configure.
>
> To llvm or llvm-gcc4?
>
> > I haven't tried ARM, but this definitely works for crosscompiling from
> > linux to mingw32. Please also note, that you'll need native (=arm) tools
> > (binutils, libcheaders, etc)
>
> You mean binutils-cross, right?
>
> > during gcc build process.
>
> Building gcc as a crosscompiler is fully automized in OpenEmbedded, I'm trying to add
> llvm-gcc4 into that framework.
>
> regards,
>
> Koen
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iD8DBQFGEBMwMkyGM64RGpERAnL+AKC4gtxNAPJetf0kOPJC2NAqF31tDwCfWmAu
> WiNlCu36rf5JQ+AwGs7VSMs=
> =LLY2
> -----END PGP SIGNATURE-----
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list