[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end

Scott Ricketts sricketts at maxentric.com
Mon May 11 12:30:03 PDT 2009


OK, updated from svn (revision 71457) and got a successful
installation. For the record:

1) Installed gcc 4.3.2 in /pkg/bin/gcc-4.3.2 (to insulate it from the
system compiler)
2) Added /pkg/bin/gcc-4.3.2/bin to my PATH
3) Added /pkg/bin/gcc-4.3.2/lib and /pkg/bin/gcc-4.3.2/lib64 to
/etc/ld.so.conf and ran ldconfig
4) More or less followed README.LLVM:

Configure llvm:
$ ../configure --prefix=/pkg/bin/llvm

Build llvm:
$ make -j10

Configure llvm-gcc:
$ ../llvm-gcc/configure --prefix=/pkg/build/llvm-svn-updated/install
--program-prefix=llvm-
--enable-llvm=/pkg/build/llvm-svn-updated/llvm-obj
--enable-languages=c,c++

Build llvm-gcc:
$ make -j10

Install (run make install in object directories for both llvm and llvm-gcc)

"make check" in llvm-obj fails one of the tests unexpectedly if I
build with ENABLE_OPTIMIZED=1. It looks for some file in Debug and
doesn't find it (LLVMHello.so).

Thanks to Duncan, Anton, and Christian for helping me through this.

Scott



More information about the llvm-dev mailing list