[LLVMdev] LLVM for ARM target
akramul azim
bijoy123_8 at yahoo.com
Sat Jan 1 20:29:44 PST 2011
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'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:368: undefined reference to `_lto_code
gen_add_module'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:387: undefined reference to `_lto_code
gen_add_must_preserve_symbol'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:401: undefined reference to `_lto_code
gen_dispose'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:405: undefined reference to `_lto_code
gen_set_pic_model'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:406: undefined reference to `_lto_code
gen_set_debug_model'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:409: undefined reference to `_lto_code
gen_set_assembler_path'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:417: undefined reference to `_lto_code
gen_set_assembler_args'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:420: undefined reference to `_lto_code
gen_set_cpu'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:426: undefined reference to `_lto_code
gen_debug_options'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:439: undefined reference to `_lto_code
gen_write_merged_modules'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:447: undefined reference to `_lto_code
gen_compile'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:473: undefined reference to `_lto_code
gen_dispose'
/llvm/llvm-src/tools/gold/Debug/gold-plugin.o: In function `claim_file_hook':
/llvm/llvm-src/tools/gold/gold-plugin.cpp:264: undefined reference to `_lto_modu
le_is_object_file_in_memory'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:268: undefined reference to `_lto_modu
le_is_object_file'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:276: undefined reference to `_lto_modu
le_create_from_memory'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:276: undefined reference to `_lto_modu
le_create'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:280: undefined reference to `_lto_get_
error_message'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:285: undefined reference to `_lto_modu
le_set_target_triple'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:288: undefined reference to `_lto_modu
le_get_num_symbols'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:292: undefined reference to `_lto_modu
le_get_symbol_attribute'
/llvm/llvm-src/tools/gold/gold-plugin.cpp:298: undefined reference to `_lto_modu
le_get_symbol_name'
collect2: ld returned 1 exit status
make[2]: *** [/llvm/llvm-src/Debug/bin/LLVMgold.dll] Error 1
make[2]: Leaving directory `/llvm/llvm-src/tools/gold'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/llvm/llvm-src/tools'
make: *** [all] Error 1
Can anyone please tell me is there any problem on my plan to build LLVM for the ARM target (for armv5te) and why I get the errors when building LLVM (make)?
Thanks,
Akramul
--- On Thu, 30/12/10, Anton Korobeynikov <anton at korobeynikov.info> wrote:
From: Anton Korobeynikov <anton at korobeynikov.info>
Subject: Re: [LLVMdev] LLVM for ARM target
To: "akramul azim" <bijoy123_8 at yahoo.com>
Cc: "Bill Wendling" <wendling at apple.com>, llvmdev at cs.uiuc.edu
Date: Thursday, 30 December, 2010, 1:29 PM
Hello
> -c ../../llvm-gcc-4.8/gcc/crtstuff.c -DCRT_BEGIN \
> -o crtbegin.o
> C:/MinGW/llvm/arm_objects/gcc/as: line 2: exec: -o: invalid option
You don't have cross ARM binutils installed.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110101/f85ec025/attachment.html>
More information about the llvm-dev
mailing list