[LLVMdev] LLVM ARM Cross-Compiler Build

Misha Brukman brukman at gmail.com
Tue Dec 30 07:55:57 PST 2008


2008/12/28 Keun Soo Yim <yim6 at illinois.edu>

>  This is a simple question about building ARM cross-compiler.
>  What is the building procedure using LLVM 2.4 and GCC front-end 4.2?
>
>  I used these commands for LLVM, and it is okay.
>
>  $ ../configure --prefix=/usr/local -target=arm
>  $ make ENABLE_OPTIMIZED=0
>  $ make ENABLE_OPTIMIZED=0 install
>
>  Then these commands were used for GCC front-end but this got couple of
> errors.
>
>  $ ../configure --prefix=/usr/local --enable-checking
> --enable-llvm=../../llvm/objdir/ --disable-bootstrap --disable-multilib
> --program-prefix=llvm- --target=arm-linux-gnu --enable-languages=c,c++,objc
>  $ make; make install
>
>  Compiler errors are caused due to absence of definition of macros:
>  MACHO_DYNAMIC_NO_PIC_P, TARGET_64BIT, and so on.
>

I've reproduced the same error on my x86/Linux system (the first macro is
undefined).  I suspect if I go ahead and also add it, I'll continue to the
next error you found.  One might guess that since this cross-tool build is
so broken, that it's likely not used by the folks targeting the ARM backend.

The folks developing on ARM instead might be using QEMU to emulate ARM on
x86, and run it as a regular (not cross) compiler in that environment.  In
fact, looking at the nightly tester runs, I've noticed one of the ARM
nightly testers seems to run in QEMU:

Nickname:shark-qemu-armv5tel
uname:Linux shark-armel 2.6.24-rc7 #1 Wed Jan 16 02:28:08 CET 2008 armv5tel
GNU/Linux
http://llvm.org/nightlytest/machine.php?machine=335

However, some other nightly testers may be running cross-compilers (but are
probably still running the tests via QEMU or similar emulator):

Nickname:lauro-armv6-N800
uname:Linux laurov-laptop 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC
2007 i686 GNU/Linux
http://llvm.org/nightlytest/machine.php?machine=172

Nickname:lauro-armv5te-softfloat
uname:Linux laurov-desktop 2.6.17-11-generic #2 SMP Tue Mar 13 23:32:38 UTC
2007 i686 GNU/Linux
http://llvm.org/nightlytest/machine.php?machine=121

Perhaps the owner(s) of these nightly testers would know how to do what
you're trying to accomplish.

Misha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081230/cf4b7af3/attachment.html>


More information about the llvm-dev mailing list