Greetings LLVM Developers,

My name is Kazuo, I’m the head of the largest Silicon Graphics IRIX community on the internet. I’m approaching this mailing list to see if any MIPS developers who hang out here are interested in developing the LLVM/Clang Compiler system for IRIX.

There’s a growing need as GCC removed support for us from 4.8, over six years ago and since then we’ve absolutely languished as a community with a growing number of FOSS that refuses to compile using the native CC or the version of GCC we have.

I can’t offer any money to anyone interested, but we have a quad CPU R16000 Origin 350 that is SSH-accessible and we would happily offer access to that for anyone who wanted to help us.

Unfortunately, we lack anyone in our community with significant compiler experience to do this ourselves, and I’m more of a sysadmin/minor code hacker than a developer.

Anyone who is interested can let me know, the SGI community would be grateful for any help at all!

Kazuo Kuroi

A relatively small Origin 350. They could have 32 CPUs, which would make them quite a beast in those days. With only four 600 MHz CPUs in 2003 I imagine a quad core one wouldn’t have any performance advantage over the 2.0 GHz PowerPC G5s and Athlon64’s that became available at about the same time. Interesting that it will apparently have a PowerPC CPU running Linux as a management processor! But that’s a digression…

What is the primary problem with newer FOSS software? Is it just use of recent C++ features? I believe gcc 4.8 has substantial but not quite complete support for C++11. If that’s what the problem is then you mostly need Clang. LLVM does already have a currently-supported MIPS back end. Does it cover the processor variant you need?

You said GCC support was removed. Are you still supported in binutils?

Hi Bruce!

It’s a quad 800MHz model. It’s definitely no POWER7 like my 4-way, 16-thread monster. I’ve never been fond of consumer POWER-based hardware, the G5 really is as forgettable as the Netburst era P4s for me.

It’s a lot of things, namely some software really wants a newer GCC/G++ version. There’s some library issues with IRIX and some support issues we need to tackle to get some software to build, IRIX is somewhere between Solaris 8 and 9 in terms of lib compatibility.

The main issues involve C++ based applications, the MIPSPro CC and GCC 4.7.3 aren’t awful for pure C coding. The main issue is that G++ never had very good IRIX ABI support. The code produced was always very subpar, and the MIPSPro C++ compiler is incompatible with programs expecting G++ - I’ve never gotten a successful program to compile with that.

From what I understand (I’m not really a developer here) LLVM has support for the necessary MIPS backend and ABIs (the target SGIs would be MIPS-IV, big-endian and using primarily the n64/n32 ABIs) but we’ve never successfully built it here. Some people tried years ago (Circa 2013) but there was no progress there. Let me be clear - I’m no developer here and I’m worried I’m not making much sense beyond the basics. I mostly just hack around code when it doesn’t work but a compiler is well above my skill level.

The latest binutils we’ve compiled were 2.18 - I’ll check if support is retained through later versions but I should say that IRIX never did well with the GNU ld linker, almost all ported software I’ve done for IRIX in my spare time has been using the IRIX ld which is similar to a less developed Solaris.

What I need is someone who we can create a user account for on this Origin 350 server who is willing to take the time to try and get a recent llvm/clang working. If someone could do that… well it would make the community’s day. I know this is a lot to ask, but I figured I’d ask the mailing list.

BTW, nice to meet a SiFive Employee. Love your guys work with RISC-V.

-Kazuo Kuroi

Just in case anyone is interested…

I recently got an SGI Octane, installed Irix 6.5.30 and MIPSpro 7.4.4, and was frustrated by the lack of a modern C/C++ compiler. (I wanted to build CMake so I could build some other software, but it requires C++11 which postdates MIPSpro.)

So on my Linux box, I built clang, compiler_rt, and lld from LLVM master, pointed them at a sysroot made from my Octane, and was able to compile a hello world MIPS n64 .o and executable with it, with no changes to any of the LLVM projects.

Unfortunately the compiled .o won’t link using the MIPSpro tools, and the executable won’t run, in both cases it appears because there are ELF features unsupported by MIPSpro’s linker and Irix’s runtime loader.

This says to me that someone who knows ELF better than I could probably just do some work on lld and get a toolchain running that can target Irix, and probably even run there.

-- Chris