[LLVMdev] How to Cross compile llvm to ARM ?

李柏舉 poki.gzca at gmail.com
Thu Jun 9 23:48:48 PDT 2011


Hi all

        I want to cross compile llvm for arm architecture on Devkit8000.

       ARM toolchain: arm-2011.03
       LLVM: llvm-2.9
       binutils: binutils-2.21

       The following is my approach:

            1. install binutils- 2.21
                put binutils to llvm src directory
                ./configure    --target=arm-linux
                                   --prefix=/path/llvm-src/arm
                                   --disable-optimized
                                   --enable-bindings=none
                                   --disable-multilib --disable-bootstrap
                                   --with-sysroot=/path/llvm/arms/sys-root

 --with-binutils-include=/path/llvm/binutils-2.21/include
                                   --with-llvmgccdir=/path/llvm/llvm-gcc-4.2

                make
                make install

             2.install LLVM
                ../llvm-2.9/configure --target=arm-none-linux-gnueabi
                                             --host=arm-none-linux-gnueabi
                                             --prefix=/path/llvm/install
                                             --disable-optimized
                                             --enable-bindings=none
                                             --disable-multilib
                                             --disable-bootstrap

 --with-sysroot=/path/llvm/arms/sys-root

 --with-binutils-include=/path/llvm/binutils-2.21/include

 --with-llvmgccdir=/path/llvm/llvm-gcc/llvm-gcc-4.2-2.9-i686-linux
                                             CFLAGS = '-static'

               make
               make install

               done !



Regards,
Poki

2011/5/10 李柏舉 <poki.gzca at gmail.com>

> Hi, all
>
> I want to compile llvm  for  arm board , running llvm on  Devkit8000
>
> cross-compiler : arm-2008q3  (arm-none-linux-gnueabi)
>
> below is my configure:
>
> ../llvm-2.9/configure
> --with-llvmgccdir=/home/poki/hybridQ/llvm/llvm-gcc/llvm-gcc-4.2-2.9-i686-linux
>                              --enable-optimized
>                              --enable-jit
>                              --disable-threads
>                              --enable-pic
>                              --disable-shared
>                              --with-pic
>                              --prefix=/home/poki/hybridQ/llvm/temp_install
>                              --build=i686-pc-linux-gnu
>                              --host=arm-none-linux-gnueabi
>                              --target=arm-none-linux-gnueabi
>
> I'm not familiar with llvm.
> Is there an error about mu configure?
>
> then make -j4    //it's ok
>         make install  //error
>
>         error message:
>
>                       strip: Unable to recognise the format of the input
> file `/home/poki/hybridQ/llvm/temp_install/bin/tblgen'
>                        /usr/bin/install: strip process terminated
> abnormally
>                       make[2]: ***
> [/home/poki/hybridQ/llvm/temp_install/bin/tblgen] Error 1
>                       make[2]: Leaving directory
> `/home/poki/hybridQ/llvm/bbuild/utils/TableGen'
>                       make[1]: *** [TableGen/.makeinstall] Error 2
>                       make[1]: Leaving directory
> `/home/poki/hybridQ/llvm/bbuild/utils'
>                       make: *** [install] Error 1
>
>
>
> Regards,
>
> Poki
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110610/814c8acb/attachment.html>


More information about the llvm-dev mailing list