I compiled LLVM with this script:
-----------------------------
#!/bin/sh
PATH=/usr/lib/cache:$PATH
cd llvm
test -f Makefile.config ||
../llvm/configure \
--prefix=/usr/src/llvm/dist \
--enable-optimized \
make
make install
----------------------------
The I've got llvm-gcc 4.01 via subversion URL
svn://anonsvn.opensource.apple.com/svn/llvm and tried to compile this
as well:
----------------------------
#!/bin/sh
PATH=/usr/lib/ccache:$PATH
mkdir -p obj-gcc
cd obj-gcc
test -f Makefile ||
../llvm-gcc/configure \
--prefix=/usr/src/llvm/dist \
--enable-llvm=/usr/src/llvm/llvm \
--enable-languages=c,c++
make
----------------------------
However, I've got an segmentation fault while it tried to istream.o:
----------------------------
/usr/src/llvm/obj-gcc/gcc/xgcc
-shared-libgcc
-B/usr/src/llvm/obj-gcc/gcc/
-nostdinc++
-L/usr/src/llvm/obj-gcc/i686-pc-linux-gnu/libstdc++-v3/src
-L/usr/src/llvm/obj-gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/usr/src/llvm/dist/i686-pc-linux-gnu/bin/
-B/usr/src/llvm/dist/i686-pc-linux-gnu/lib/
-isystem /usr/src/llvm/dist/i686-pc-linux-gnu/include
-isystem /usr/src/llvm/dist/i686-pc-linux-gnu/sys-include
-I/usr/src/llvm/obj-gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu
-I/usr/src/llvm/obj-gcc/i686-pc-linux-gnu/libstdc++-v3/include
-I/usr/src/llvm/llvm-gcc/libstdc++-v3/libsupc++
-g
-O2
-D_GNU_SOURCE
-fno-implicit-templates
-Wall
-Wextra
-Wwrite-strings
-Wcast-qual
-fdiagnostics-show-location=once
-ffunction-sections
-fdata-sections
-c ../../../../llvm-gcc/libstdc++-v3/src/istream.cc
-fPIC -DPIC
-o .libs/istream.o
../../../../llvm-gcc/libstdc++-v3/src/istream.cc:495: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs> for instructions.
----------------------------
Now, xgcc is from llvm-gcc, so I'm not sure if my locally installed GCC
compiler is at fault, which is "gcc (GCC) 4.1.3 20070629 (prerelease)
(Debian 4.1.2-13)"
I'm now trying to compile llvm-gcc with
----------------------------
make CC=gcc-4.2 CC_FOR_BUILD=gcc-4.2 CXX=g++-4.2 CXX_FOR_BUILD=g++-4.2
----------------------------