The latest working version is gcc 3.0.3 which was available at the offical PS2 Linux homepage. This page is closed now. You can look at the dosbox thread in this forum to get the it.
Otherwise the best you can get is here: http://rapidshare.com/files/37089499...4.tar.bz2.html
This includes binutils-2.16.1 and gcc-4.2.0.
It is not possible to compile it completely. You will only get the early stage called xgcc. When you try to compile something with xgcc, it is very likely that the compiler stops with an internal error. To get this solved you need to be a GCC expert. Only simple assembler will work. I assume most people don't want assembler only.
You can test the new binutils with the following program:
Code:
#define zero $0
#define AT $1
#define v0 $2
#define v1 $3
#define a0 $4
#define a1 $5
#define a2 $6
#define a3 $7
#define t0 $8
#define gp $29
#define ra $31
.data
msg:
.ascii "MIPS Assembler Test\n"
len:
.long . - msg
.text
.global __start
__start:
lui $29, %hi(_gp)
addiu $29, %lo(_gp)
li $2, 4004
li $4, 1
la $5, msg
lw $6, len
syscall
li $4, 0
li $2, 4001
syscall
You can compile it with the commands:
Code:
ee-as -o mini.o mini.s
ee-ld -o simple mini.o