[LLVMdev] Building llvm-gcc4 on amd64

Domagoj Babic babic.domagoj at gmail.com
Sat Dec 9 22:26:49 PST 2006

Hi all,

I spent several hours today trying to compile llvm-gcc4 from svn and llvm from
cvs on amd64 linux. In the case anyone else decides to try the same, this
could ease your pain:

1) check out llvm, llvm-gcc
2) create llvm-obj llvm-gcc-obj
export LLVM_INSTAL=<install_dir>
cd llvm-obj
export LLVM_OBJ=`pwd`
../llvm/configure --prefix=$LLVM_INSTALL --enable-debug-runtime
4) At one point, the build script calls c++, but by default, gcc
installs g++, and (at least 4.0.3 on my machine) doesn't create
c++ alias, so create one if you don't already have it:
ln -s /usr/bin/g++ /usr/bin/c++
5) cd ../llvm-gcc-obj
../llvm-gcc/configure --disable-shared --prefix=$LLVM_INSTALL \
    --enable-languages=c,c++ --enable-llvm=$LLVM_OBJ \
    --program-prefix=llvm- --enable-checking --disable-multilib

llvm-gcc4 README.LLVM doesn't mention that --disable-multilib is
required for amd64. I guess that should be updated.


More information about the llvm-dev mailing list