[LLVMdev] Compiling llvm-gcc in linux/ppc

Chris Lattner sabre at nondot.org
Mon May 14 11:13:09 PDT 2007


On Mon, 14 May 2007, Nicolas Geoffray wrote:
> Hi everyone, I am using linux/ppc and after porting llvm's jit for this
> architecture, I am currently trying to compile llvm-gcc on it.
>
> I have gcc 4.1.1 and use llvm-gcc from cvs.

This looks like you're compiling llvm-gcc3, which is quite dead by now. 
Please follow these instructions:
http://llvm.org/docs/CFEBuildInstrs.html

In particular, following the instructions in README.LLVM is very 
important.  Building the fortran front-end, for example, won't work.

-Chris

> Compilation fails and the message is:
>
> gcc   -O2 -DIN_GCC
> -DDEFAULT_TARGET_MACHINE=\"powerpc-unknown-linux-gnu\"  -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
> -Wno-long-long -fno-common   -DHAVE_CONFIG_H  -o f771 f/bad.o f/bit.o
> f/bld.o f/com.o f/data.o f/equiv.o f/expr.o f/global.o f/implic.o
> f/info.o f/intrin.o f/lab.o f/lex.o f/malloc.o f/name.o f/parse.o
> f/src.o f/st.o f/sta.o f/stb.o f/stc.o f/std.o f/ste.o f/storag.o
> f/stp.o f/str.o f/sts.o f/stt.o f/stu.o f/stv.o f/stw.o f/symbol.o
> f/target.o f/top.o f/type.o f/where.o main.o libbackend.a
> ../libiberty/libiberty.a
> libbackend.a(llvm-out.o): In function `llvm_c_expand_body':
> llvm-out.c:(.text+0x1c2): undefined reference to `lang_expand_function_end'
> llvm-out.c:(.text+0x1c6): undefined reference to `lang_expand_function_end'
> libbackend.a(llvm-out.o): In function `llvm_init_asm_output':
> llvm-out.c:(.text+0x70e): undefined reference to `c_language'
> llvm-out.c:(.text+0x716): undefined reference to `c_language'
> llvm-out.c:(.text+0x7ba): undefined reference to `c_language'
> llvm-out.c:(.text+0x7c2): undefined reference to `c_language'
> llvm-out.c:(.text+0x7ea): undefined reference to `c_language'
> libbackend.a(llvm-expand.o): In function `llvm_emit_local_var':
> llvm-expand.c:(.text+0x16f48): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x16f60): undefined reference to
> `stmts_are_full_exprs_p'
> libbackend.a(llvm-expand.o): In function `genllvm_decl_stmt':
> llvm-expand.c:(.text+0x203a6): undefined reference to
> `lang_expand_decl_stmt'
> llvm-expand.c:(.text+0x203aa): undefined reference to
> `lang_expand_decl_stmt'
> llvm-expand.c:(.text+0x204d8): undefined reference to `anon_aggr_type_p'
> libbackend.a(llvm-expand.o): In function `llvm_expand_stmt':
> llvm-expand.c:(.text+0x20c98): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x20ca4): undefined reference to `prep_stmt'
> llvm-expand.c:(.text+0x20d64): undefined reference to `current_stmt_tree'
> llvm-expand.c:(.text+0x20ea4): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x20ecc): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x210fc): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x21108): undefined reference to `prep_stmt'
> llvm-expand.c:(.text+0x21118): undefined reference to `current_stmt_tree'
> libbackend.a(llvm-expand.o): In function `genllvm_for_stmt':
> llvm-expand.c:(.text+0x227e8): undefined reference to
> `stmts_are_full_exprs_p'
> llvm-expand.c:(.text+0x2283c): undefined reference to
> `stmts_are_full_exprs_p'
> libbackend.a(tree-inline.o): In function `copy_tree_r':
> tree-inline.c:(.text+0x2e2): undefined reference to `statement_code_p'
> tree-inline.c:(.text+0x2e6): undefined reference to `statement_code_p'
> libbackend.a(tree-inline.o): In function `walk_tree':
> tree-inline.c:(.text+0x436): undefined reference to `statement_code_p'
> tree-inline.c:(.text+0x43a): undefined reference to `statement_code_p'
> tree-inline.c:(.text+0x546): undefined reference to `statement_code_p'
> libbackend.a(tree-inline.o):tree-inline.c:(.text+0x54a): more undefined
> references to `statement_code_p' follow
> libbackend.a(tree-inline.o): In function `copy_body_r':
> tree-inline.c:(.text+0x2620): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x26d4): undefined reference to `build_stmt'
> libbackend.a(tree-inline.o): In function `expand_call_inline':
> tree-inline.c:(.text+0x37a0): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x3808): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x386c): undefined reference to `build_stmt'
> libbackend.a(tree-inline.o):tree-inline.c:(.text+0x3c44): more undefined
> references to `build_stmt' follow
> libbackend.a(tree-inline.o): In function `expand_call_inline':
> tree-inline.c:(.text+0x3d54): undefined reference to `decl_constant_value'
> tree-inline.c:(.text+0x4108): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x4390): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x446c): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x44e4): undefined reference to `build_stmt'
> tree-inline.c:(.text+0x4b78): undefined reference to `build_stmt'
> libbackend.a(tree-inline.o):tree-inline.c:(.text+0x4b90): more undefined
> references to `build_stmt' follow
> collect2: ld returned 1 exit status
> make[1]: *** [f771] Error 1
> make[1]: Leaving directory `/home/varth/project/llvm-cvs/llvm-gcc/gcc'
> make: *** [all-gcc] Error 2
>
> If anyone has a clue...
>
> Best,
> Nicolas
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list