export CC="gcc -no-cpp-precomp"
Now follow Chris' instructions to include support for the 64-bit BFD, which I will reproduce here for your convenience. Edit bfd/config.bfd to include the following:
#ifdef BFD64
mips64*-*-elf*)
targ_defvec=bfd_elf64_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf32_bigmips_vec bfd_elf64_littlemips_vec"
;;
#endif
There is a convenient place for this just before mips*-*-irix6*, which is already inside the relevant #ifdef.Now configure and make the thing!
./configure --target=mips64-elf --prefix=/usr/local/mips64-elf-xdev --enable-64bit-bfd
make all
sudo make install
Now stick that directory in your path. You probably want to do this inside a .bashrc or equivalent, too...
export PATH=$PATH:/usr/local/mips64-elf-xdev/bin
patch -p3 <wherever-you-put-the-patch
This patch adds the 64-bit BFD to GCC as well.
Now configure and make that thing!
export CFLAGS="-Dinhibit_libc"
./configure --prefix=/usr/local/mips64-elf-xdev --target=mips64-elf --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-64bit-bfd --program-prefix=mips64-elf-
make all-gcc
sudo make install all-gcc
If you get a whole lot of syntax-ish errors, chances are you didn't define CC as "gcc -no-cpp-precomp". If you get warnings about "not valid for this BFD" then chances are your binutils aren't compiled with 64bit-bfd support. Even if you get everything right you'll get a few warnings about traditional C not liking this and ANSI C disagreeing with that, not to mention signed/unsigned comparisons blah blah blah.
Similarly, dite (part of l4alpha) uses some tricksy #defines which confuse the "smart" preprocessor. Just exporting CC doesn't work here; you'll need to modify dite/src/Makefile or supply a parameter to ./configure .
Unfortunately, the MIPS simulator that DiSY uses, Sulima, doesn't yet work properly on big-endian architectures, so you'll have to use real hardware or a Linux box running the sim for now. Good luck.
- Nicholas FitzRoy-Dale Fri Aug 15 01:55:12 EST 2003