llvm-3.0rc2 build error on linux/ppc

i just tried to build llvm-3.0rc2 on my powerpc (G4) but without success.

My toolchain (CRUX PPC 2.7):
gcc-4.5.3, binutils-2.21.1, glibc-2.12.2, libffi-3.0.10

my llvm config:
./configure --prefix=/usr --mandir=/usr/man \
    --enable-shared \
                --enable-libffi --enable-optimize \
                --enable-targets=all \
                --enable-threads --enable-pic --enable-jit \
                --disable-assertions \
                --with-cxx-include-root=/usr/include/c++/$(gcc
--version | grep gcc | cut -f4 -d " ") \
                --with-cxx-include-arch=$HOSTTYPE-unknown-linux-gnu

my errror:

[...]
make[4]: Entering directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/Sparc/MCTargetDesc'
llvm[4]: Compiling SparcMCAsmInfo.cpp for Release build
llvm[4]: Compiling SparcMCTargetDesc.cpp for Release build
llvm[4]: Building Release Archive Library libLLVMSparcDesc.a
make[4]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/Sparc/MCTargetDesc'
make[3]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/Sparc'
make[3]: Entering directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC'
llvm[3]: Building PPC.td register info implementation with tblgen
llvm[3]: Building PPC.td assembly writer with tblgen
llvm[3]: Building PPC.td code emitter with tblgen
llvm[3]: Building PPC.td instruction information with tblgen
llvm[3]: Building PPC.td DAG instruction selector implementation with tblgen
llvm[3]: Building PPC.td subtarget information with tblgen
llvm[3]: Building PPC.td calling convention information with tblgen
llvm[3]: Building PPC.td MC code emitter with tblgen
llvm[3]: Compiling PPCAsmPrinter.cpp for Release build
In file included from MCTargetDesc/PPCMCTargetDesc.h:41:0,
                 from MCTargetDesc/PPCBaseInfo.h:20,
                 from PPC.h:18,
                 from PPCAsmPrinter.cpp:20:
/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC/PPCGenRegisterInfo.inc:17:11:
error: expected identifier before numeric constant
/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC/PPCGenRegisterInfo.inc:17:11:
error: expected unqualified-id before numeric constant
In file included from
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/new:42:0,
                 from
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/ext/new_allocator.h:33,
                 from
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/powerpc-unknown-linux-gnu/bits/c++allocator.h:34,
                 from
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/bits/allocator.h:48,
                 from
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/string:43,
                 from
/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/include/llvm/ADT/StringRef.h:16,
                 from
/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/include/llvm/Support/ErrorHandling.h:19,
                 from MCTargetDesc/PPCBaseInfo.h:21,
                 from PPC.h:18,
                 from PPCAsmPrinter.cpp:20:
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/exception:37:37:
error: expected '}' before end of line
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/../../../../include/c++/4.5.3/exception:37:37:
error: expected declaration before end of line
/bin/rm: cannot remove
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC/Release/PPCAsmPrinter.d.tmp':
No such file or directory
make[3]: *** [/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC/Release/PPCAsmPrinter.o]
Error 1
make[3]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target/PowerPC'
make[2]: *** [PowerPC/.makeall] Error 2
make[2]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib/Target'
make[1]: *** [Target/.makeall] Error 2
make[1]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0rc2.src/lib'
make: *** [all] Error 1

thanks,
Nello

Nello,it is known issue :wink:
You may work around to add -UPPC.

http://llvm.org/bugs/show_bug.cgi?id=10969

FYI, LLVM RC2 passes on ppc-linux.
http://bb.pgr.jp/builders/clang-ppc-linux/builds/125

...Takumi

hi Takumi,
thanks a lot for your help!

cheers,
Nello