python has a number of issues when building on IRIX - mostly due to its outdated (o)32 ABI support. It appears that the only thing really broken is ffi closures, which lack IRIX n32 support. I'm not sure how significant this is in the scheme of things, but it does prevent Modules/_ctypes from being built...
Created attachment 183031 [details, diff] Patches to allow python-2.5.4-r2 to build on IRIX (almost) cleanly
Does this mean the patch is not yet complete? Do you by chance have the ability to test the patch on other platforms? Some of the ifdef changes and casts might barf, but I'm not at all sure of that.
I think that the patch is as complete as it's going to get... Python-2.5 seems to bundle a 6-year old version of ffi, and whilst this was written with o32/n32/64 ABI support, FFI closures are only implemented for the o32 ABI. It's beyond my ability to re-implement ffi for n32, and I dread to think of the regression issues of porting a later libffi into Python. Having said this, the libffi homepage lists the supported platforms as: "mips o32 linux (little endian)" ... so it may be that nothing other than o32 will ever be usable :( I can try the patch on x86-64 Linux, to see if it does any harm. The changes to Modules/_ctypes/libffi/src/mips/ffitarget.h should probably be wrapped in a '#ifndef __GNUC' (or whatever the correct symbol is), but I think that the remainder are all correct even for GCC on other platforms (and it's just that GCC isn't sufficiently verbose by default to alert anyone)
patch applied, thanks!