[LLVMdev] Building llvm using non-system gcc/binutils

john blair mailtome200420032002 at yahoo.com
Thu May 13 12:28:30 PDT 2010


I am trying to build llvm-2.7 using non-system gcc/binutils. My gcc version is 4.1.2, and binutils is 2.17.50.0.15. I get the following errors

`.L2438' referenced in section `.gnu.linkonce.r._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE' of /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o): defined in discarded section `.gnu.linkonce.t._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE' of /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o)
....
....
make[1]: *** [/build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVM-2.7.so] Error 1
make[1]: Leaving directory `/build/toolchain/src/llvm-2.7/objdir/tools/llvm-shlib'
make: *** [all] Error 1

I configure it using 
export PATH=/build/toolchain/lin32/binutils-2.17.50.0.15/bin:$PATH
LDFLAGS=-L"/build/toolchain/lin32/gcc-4.1.2-8/lib" CC=/build/toolchain/lin32/gcc-4.1.2/bin/gcc CXX=/build/toolchain/lin32/gcc-4.1.2/bin/g++ ../llvm-2.7/configure 

This works with 2.6.


      



More information about the llvm-dev mailing list