I build llvm-gcc as:
../llvm-gcc4.2-2.5.source/configure --enable-languages=c,c++ --program-
prefix=llvm
So it should install into /usr/local/... but add llvm- prefix. This is so
llvm-gcc is found by llvm
(http://llvm.org/releases/2.5/docs/GettingStarted.html claims that's what it
is looking for)
and also so there will be no conflict with system gcc.
But I see:
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/
-rwxr-xr-x 1 root root 25179621 2009-03-25 09:15 cc1
-rwxr-xr-x 1 root root 27917074 2009-03-25 09:15 cc1plus
-rwxr-xr-x 1 root root 359307 2009-03-25 09:15 collect2
drwxr-xr-x 2 root root 4096 2009-03-25 09:15 install-tools
No llvm-prefix. I hope this doesn't cause a conflict with the system
versions.
OK, let me rephrase this. What is the preferred way to install llvm + llvm-
gcc onto a fedora system?
Here is what I used:
../llvm-gcc4.2-2.5.source/configure --enable-languages=c,c++ --program-
prefix=llvm
make
make install
../llvm-2.5/configure --enable-optimized --prefix=/usr/local
make
make install
The programs with the llvm- prefix should be found in $PREFIX/bin, which in your case should be /usr/local/bin .
Misha
OK, let me rephrase this. What is the preferred way to install llvm + llvm-
gcc onto a fedora system?
The preferred way to install LLVM and LLVM-GCC is the same on pretty much any Linux system and described here:
http://llvm.org/docs/GettingStarted.html#starting
Here is what I used:
…/llvm-gcc4.2-2.5.source/configure --enable-languages=c,c++ --program-
prefix=llvm
make
make install
…/llvm-2.5/configure --enable-optimized --prefix=/usr/local
make
make install
You should read the section (in the doc above) about specifying --with-llvmgccdir and compiling/installing LLVM bitcode libraries for LLVM-GCC.
Misha
Misha Brukman wrote:
OK, let me rephrase this. What is the preferred way to install llvm
+ llvm-
gcc onto a fedora system?
You should read the section (in the doc above) about specifying --with-llvmgccdir and compiling/installing LLVM bitcode libraries for LLVM-GCC.
Also the README.LLVM file in the llvm-gcc source contains some information that might be helpful.
Luke
Here is what I used:
../llvm-gcc4.2-2.5.source/configure --enable-languages=c,c++ --program-
prefix=llvm
Please do read readme.llvm file as instruction states. You're not
building llvm-gcc this way.
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/
-rwxr-xr-x 1 root root 25179621 2009-03-25 09:15 cc1
-rwxr-xr-x 1 root root 27917074 2009-03-25 09:15 cc1plus
-rwxr-xr-x 1 root root 359307 2009-03-25 09:15 collect2
drwxr-xr-x 2 root root 4096 2009-03-25 09:15 install-tools
No llvm-prefix.
That's correct and not a llvm-gcc problem. This is how gcc's makefile
machinery manages the things: only user-visible stuff has prefix
attached.
I hope this doesn't cause a conflict with the system versions.
This can easily be, especially if your system gcc is 4.2.1 and wants
to use /usr/local dir as prefix somehow...
Neal Becker wrote:
OK, let me rephrase this. What is the preferred way to install llvm + llvm-
gcc onto a fedora system?
Here is what I used:
../llvm-gcc4.2-2.5.source/configure --enable-languages=c,c++ --program-
prefix=llvm
make
make install
../llvm-2.5/configure --enable-optimized --prefix=/usr/local
make
make install
Well, you need to build llvm first. Assuming that you already built that
in $src/llvm-2.5/obj and you're building llvm-gcc in
$src/../llvm-gcc4.2-2.5.source/obj, you do:
../configure --program-prefix=llvm- --enable-llvm=$src/llvm-2.5/obj
--enable-languages=c,c++
make
make install
On x86_64, add --disable-multilib to configure in order to build a plain
64 bit compiler, otherwise you need some additional stuff but you found
out about this already. 
Ah yes, and don't forget to install the mpfr-dev package or what it's
called on Fedora, gcc doesn't like the buggy mpfr included with GMP. (At
least that's required if you also build the Fortran compiler, not sure
if it's needed otherwise.)
That's how it works for me on SUSE, I guess it should be pretty much the
same on every Linux system.
Albert
Anton Korobeynikov wrote:
I hope this doesn't cause a conflict with the system versions.
This can easily be, especially if your system gcc is 4.2.1 and wants
to use /usr/local dir as prefix somehow...
Fedora uses gcc-4.4 by now if I'm not mistaken, and the system compiler
lives under /usr anyway, so that shouldn't be a problem.