[LLVMdev] LLVM for ARM target

Bill Wendling wendling at apple.com
Sat Jan 1 22:07:04 PST 2011


On Jan 1, 2011, at 8:29 PM, akramul azim wrote:

> Hi,
>     I am planning to follow the steps to install LLVM for the ARM-target (Processor: Xscale, Architecture: armv5te):
>  
> 1. Install binutils-2.21 (downloaded from gnu.org)
>  
> Steps:
>  
> $ ./configure --target=arm-unknown-linux-gnueabi --program-prefix=arm- --prefix
> =/llvm/arm --with-sysroot=/llvm/arms/sys-root
>  
> $ make
>  
> $ make install
>  
> 
> 2. Install LLVM
>  
> Steps
>  
> $ ../llvm-src/configure --target=arm-linux --prefix=/llvm/arm --disable-optimiz
> ed --enable-bindings=none --disable-multilib --disable-bootstrap --with-sysroot
> =/llvm/arms/sys-root --with-binutils-include=/llvm/binutils-2.21/include --with
> -llvmgccdir=/llvm/llvm-gcc-4.2
>  
> $ make
>  
> $ make install
>  
> 3. Install LLVM-GCC
>  
> Steps:
>  
> $ ../llvm-gcc/configure --target=arm-linux --program-prefix=arm- --prefix=$PWD/
> ../install --disable-optimized --enable-bindings=none --enable-llvm=$PWD/../llv
> m-2.8 --enable-languages=c,c++ --disable-multilib --disable-bootstrap
> $ make
>  
> $ make install
>  
>  
> However, when I try to build LLVM source (second step) by make, I get the following error:
>  
> llvm[2]: Linking Debug Loadable Module LLVMgold.dll
> /llvm/llvm-src/tools/gold/Debug/gold-plugin.o: In function `all_symbols_read_hoo
> k':
> /llvm/llvm-src/tools/gold/gold-plugin.cpp:364: undefined reference to `_lto_code
> gen_create'

It looks like llvm/tools/lto wasn't built in step 1 (you can check to see if this is so). From the Makefile, it will built tools/lto when ENABLE_PIC is 1. Check to see what ENABLE_PIC is set to in the Makefile.config file. If it's not set, try using the --enable-pic flag during LLVM's configure.

-bw






More information about the llvm-dev mailing list