Cross compiling GCC 4.2 build errors

I get the following assertion failure during my attempt to build an x86_64->ARM cross compiler.

/./gcc/xgcc -B/./gcc/ -B/arm-none-linux-gnueabi/bin/ -B/arm-none-linux-gnueabi/lib/ -isystem /arm-none-linux-gnueabi/include -isystem /arm-none-linux-gnueabi/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I<llvm-gcc-4.2-source>/gcc -I<llvm-gcc-4.2-source>/gcc/. -I<llvm-gcc-4.2-source>/gcc/…/include -I<llvm-gcc-4.2-source>/gcc/…/libcpp/include -I<llvm-gcc-4.2-source>/gcc/…/libdecnumber -I…/libdecnumber -I/llvm/include -I<llvm-src/llvm/include -DL_muldc3 -fvisibility=hidden -DHIDE_EXPORTS -c …/…/…/…/src/llvm-gcc-4.2/gcc/libgcc2.c -o libgcc/./_muldc3.o
cc1: /llvm/lib/CodeGen/RegisterScavenging.cpp:273: void llvm::RegScavenger::forward(): Assertion `(isReserved(Reg) || isUnused(Reg) || IsImpDef || isImplicitlyDefined(Reg) || isLiveInButUnusedBefore(Reg, MI, MBB, TRI, MRI)) && “Re-defining a live register!”’ failed.
…/…/…/…/src/llvm-gcc-4.2/gcc/libgcc2.c:1914: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:[http://developer.apple.com/bugreporter](http://developer.apple.com/bugreporter) for instructions.

Can some one please tell me what the problem is?

Here is some relevant info:

LLVM and llvm-gcc-4.2 source rev 64487
$ svn info
Path: .
URL: http://llvm.org/svn/llvm-project/llvm/trunk
Repository Root: http://llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 64487
Node Kind: directory
Schedule: normal
Last Changed Author: djg
Last Changed Rev: 64468
Last Changed Date: 2009-02-13 12:45:12 -0500 (Fri, 13 Feb 2009)

$ svn info
Path: .
URL: http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
Repository Root: http://llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 64487
Node Kind: directory
Schedule: normal
Last Changed Author: baldrick
Last Changed Rev: 64234
Last Changed Date: 2009-02-10 15:43:26 -0500 (Tue, 10 Feb 2009)

LLVM configured and successfully built as :
/configure --with-llvmgccdir=/llvm-gcc-4.2 --enable-optimized --enable-jit --prefix=<llvm-install/llvm --target=arm-unknown-linux-gnueabi

llvm-gcc-4.2 configured as :
<llvm-gcc-4.2-source>/configure --prefix=<llvm-install/llvm-gcc-4.2 --program-prefix=llvm-x86_64-arm --enable-llvm=/llvm --disable-multilib --target=arm-none-linux-gnueabi --with-sysroot= --enable-languages=c,c++

Thanks,

Bharadwaj

I get the following assertion failure during my attempt to build an x86_64->ARM cross compiler.

/./gcc/xgcc -B/./gcc/ -B/arm-none-linux-gnueabi/bin/ -B/arm-none-linux-gnueabi/lib/ -isystem /arm-none-linux-gnueabi/include -isystem /arm-none-linux-gnueabi/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I<llvm-gcc-4.2-source>/gcc -I<llvm-gcc-4.2-source>/gcc/. -I<llvm-gcc-4.2-source>/gcc/…/include -I<llvm-gcc-4.2-source>/gcc/…/libcpp/include -I<llvm-gcc-4.2-source>/gcc/…/libdecnumber -I…/libdecnumber -I/llvm/include -I<llvm-src/llvm/include -DL_muldc3 -fvisibility=hidden -DHIDE_EXPORTS -c …/…/…/…/src/llvm-gcc-4.2/gcc/libgcc2.c -o libgcc/./_muldc3.o
cc1: /llvm/lib/CodeGen/RegisterScavenging.cpp:273: void llvm::RegScavenger::forward(): Assertion `(isReserved(Reg) || isUnused(Reg) || IsImpDef || isImplicitlyDefined(Reg) || isLiveInButUnusedBefore(Reg, MI, MBB, TRI, MRI)) && “Re-defining a live register!”’ failed.
…/…/…/…/src/llvm-gcc-4.2/gcc/libgcc2.c:1914: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:[http://developer.apple.com/bugreporter](http://developer.apple.com/bugreporter) for instructions.

Please add -emit-llvm to produce a bitcode and attach it to a bugzilla report.

Thanks,

Evan