Building llvm-gcc4 on amd64

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Building llvm-gcc4 on amd64

Domagoj Babic
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Building llvm-gcc4 on amd64

Chris Lattner
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/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Building llvm-gcc4 on amd64

Chandler Carruth
In reply to this post by Domagoj Babic
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 <[hidden email]> 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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Building llvm-gcc4 on amd64

Domagoj Babic
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
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev