The collected works of hbent

Has anyone looked into getting a modern version of GCC to run on IRIX 4? I have an Indigo running 4.0.5F and have toyed with builds on and off for a while, with little promise of success until recently.

The most recent version of GCC that will build successfully on IRIX 4 without modifications is GCC 3.0.4. 3.1 and 3.2 have problems with gcc/config/mips/mips.md, and after that the GCC folks dropped compatibility with older versions of IRIX. However I recently succeeded, with some source modifications, in building cross-compilers of 3.4.6 and 4.1.2 (x64 NetBSD host). Unfortunately I can't get 3.4.6 to build natively. The first major problem is a command line that exceeds NCARGS (only 10248!) but even after circumventing that problem I get internal GCC errors before the end of the build. I have not yet invested the time to try building 4.1.2 natively but will soon. And I thought gcc builds on my Octane2 were slow!

If anyone else is working on this or has any advice, I'd love to hear it. I bet this work could be leveraged to IRIX 3 too, they are very similar from GCC's perspective.
I did mean an R4k Indigo, doing this on an R3k would be like watching paint dry. Though I did build 3.3.6 once on a Mac IIci running A/UX, as I recall it took well over 24 hours, probably very similar to working on a SPARCclassic.

My main motivation is to get to a version of GCC that knows about the R4000 errata. I'm hoping it will fix the coredumps I sometimes get when compiling software with -mips2.
miod wrote: Well, the two .S files seem mips1-compatible to me. What may be wrong, OTOH, are the stack adjustments. The mips default frame size in gcc-produced code has changed several times over gcc development, and since almost noone tests gcc on IRIX < 5 those days, it is very likely that a stack frame size change has been applied everywhere but in gcc/config/mips/crt[in].asm...


Frames are definitely my problem at the moment. The cross-compiler generates them correctly:

Code: Select all

.frame  $fp,24,$31              # vars= 0, regs= 2/0, args= 16, gp= 0


but the native compiler is totally wacked:

Code: Select all

.frame  $fp,12698368,(null)             # vars= 24, regs= 269896524/0, args= 0, gp= 0


I was working on the assumption that it was a problem with the compiler I was using to build gcc, and have switched to a different one for the run I'm doing now. Is there something else I should look into?
I have come to the realization that the chassis and power supply for my 4D/340 VGXT are just too far gone to be repaired, so I am parting out the boards. I have no idea what the going rate for any of these are, so just PM me offers and we'll work something out. I will ship anywhere in the world as long as you are willing to pay for it. Because I cannot power up these boards, I CANNOT GUARANTEE THAT ANYTHING WORKS, but it definitely all did the last time the system was powered on (2012). The one exception is that I could never get the ethernet on the IO3 board to work, which is why I have the extra VME ethernet board.

Here's the list of what I have:

IO3 030-0210-004 Rev A
IP7 030-0135-012 Rev A
IP7 030-0135-012 Rev A
MC2 030-0117-034 Rev B (8x8MB)
GM3 030-0213-004 Rev A
GE6 030-0153-004 Rev C
RM3 030-0220-001 Rev A
DG1 030-0158-004 Rev G
013-0204-002 CMC E/NET Rev D
Plus a sled with an SGI-branded Seagate ST41200N. The stickers say "FGI 3.3.2" and "IP12 ALPHA 15" but sadly the drive was wiped when I got it.

Alternately, I would be willing to trade some/all of this for a working R4K Indigo.
duewix wrote: Where are you located? If shipping would not be astronomical, I would be interested (I'm in Pennsylvania). I do have a couple of 4k indigos and I can check specs for you or we can do a cash deal.


I'm in NE Ohio outside of Cleveland. I don't think shipping for several boards would be astronomical, especially not over that short distance. In the case of a trade (which I think at this point would probably be my preference), I was thinking that I would cover shipping on my end and you would cover it on yours.

Pontus wrote: How bad is the chassi/skins?


The skins are a little banged up, and it's missing the skirt on one side plus the entire back piece. The chassis is mostly OK but there are a few spots with surface rust, mostly by air intakes.