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 6) ../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. Domagoj
On Sat, 9 Dec 2006, Domagoj Babic wrote:> llvm-gcc4 README.LLVM doesn't mention that --disable-multilib is > required for amd64. I guess that should be updated.I added a note. What fails though? This shouldn't be needed. -Chris -- http://nondot.org/sabre/ http://llvm.org/
I am also trying to build llvm-gcc4 and llvm as you are on amd64 linux. I am currently running into the error "Did not get a target machine!" on the first file compiled by xgcc. Did you encounter this error at all? Also, what distribution did you use? GCC version, and target triple? Thanks, -Chandler Carruth On 12/10/06, Domagoj Babic <babic.domagoj at gmail.com> wrote:> > 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 > 6) > ../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. > > Domagoj > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061220/1aa3679b/attachment.html>
Hi Chandler, I didn't have to specify target triple at all, just -disable-multilib. Also, you need to compile things in the proper order. I don't remeber the order exactly, I think llvm -> llvm_gcc4 -> make check llvm. Domagoj
Seemingly Similar Threads
- [LLVMdev] Building llvm-gcc4 on amd64
- [LLVMdev] How to compile apps to bc files with the new llvm-gcc4?
- [LLVMdev] How to compile apps to bc files with the new llvm-gcc4?
- [LLVMdev] constructing 'for' statement from LLVM bitcode
- [LLVMdev] How to compile apps to bc files with the new llvm-gcc4?