Users of MIPS and PowerPC backends in production-class projects?

Hi,

I'd like to experiment with the MIPS and PowerPC backends, but,
considering that they aren't widely used processors, I'd like to start
with the same environment (OS/ABI/linker) used by the people who work
with these backends.

So, what OS/ABI/linker use the people who use these backends for
production work?

Thanks!!

For PowerPC, common uses are on little endian systems running Linux. The ABI used on such systems is the ELF v2 ABI and both the GNU linker and GOLD are in widespread use as far as I’m aware. Big endian systems running Linux are somewhat common but they use the ELF v1 ABI and mostly the GNU linker.

I will defer to Hal Finkel (on Cc) for use on larger distributed systems as well as to others for use of the PowerPC back end on 32-bit and embedded processors.

For MIPS, the common OSes would be Linux/FreeBSD/NetBSD/OpenBSD.

Endianness is somewhat variable as many MIPS designs have big endian and
little endian variants. Typically you can assume big endian but little endian is
fairly common as well.

For the ABI would be O32 for 32 bit MIPS and N64 for 64 bit MIPS. There is
another ABI, N32 which fulfils a similar role as X32 for x86_64 i.e. 32bit pointers
with 64 integers. This is what stock GCC targets by default for mips64. LLVM for
mips64 targets N64 by default for historical reasons.

Historically, MIPS has had other ABIs defined for it, such as GNU's EABI and it's
64 bit variant and O64. You can stick with O32/N64/N32 as most of the OS
distributions will only use those ABIs.

The usual linker would be the GNU linker and GOLD. LLD is in a good shape for
MIPS.

For baremetal / embedded / kernel environments, the tools and ABIS are the
same but you compile code as non-pic and use custom linker scripts and
startup code tailored to the environment.

Thanks,
Simon

We're still working to get FreeBSD fully building for PowerPC with
clang, and have been in a state of "almost there" for some time now.
There are two methods of doing so, one is using the in-tree binutils
(2.17.50+patches), which has been patched to support newer relocations
LLVM generates; the other is using an external toolchain binutils
(2.25?). We've had luck with both, and will be looking at lld in the
future as well.

- Justin

Is the MIPS backend production-ready for any (or all) of the OSs you mention? As I said, I’d like to start using the MIPS and PowerPC backends with an OS/linker where they are most reliable.

In the case of PowerPC, from the comments I conclude there’s people successfully using the backend in Linux. OTOH, FreeBSD is “almost there”, and not sure about NetBSD and OpenBSD.

In the case of MIPS, would Linux be the most reliable choice, or is any BSD flavour already using the backend successfully?

Thanks!

ardi

For MIPS, NetBSD certainly does not support Clang at the moment as
system compiler. I don't think the FreeBSD situation is not that much
different.

For 32bit PowerPC, testing is somewhat limited, but it was a usable base
system in the past. I need to restart testing this more aggressively.

Joerg

We use the LLVM/PowerPC on big-Endian PPC64/Linux using recent binutils in production (on POWER7 and the BG/Q). -Hal

We're getting close on mips64, big endian. Userspace support is ok and
quite a bit works with clang/lld. The kernel links, but does not work.

-- Brooks

Hi Ardi,

So, what OS/ABI/linker use the people who use these backends for
production work?

W.R.T production use of llvm ppc, we make extensive use of the ppc backend
in the HPC (High Performance Computing, i.e. "Supercomputers") community
since clang tends to produce much better quality code for C++ than IBM
xlC. Most all of these are Linux + gcc linker. The ones that aren't Linux
are the BlueGene/Q which use a custom OS just for that machine, but those
are using a special port that Argonne National Labs maintains (bgclang), so
that's likely less of a concern for you. Moving forward virtually all the
ppc platforms of concern are Linux, littel endian, i.e. ppc64le, mostly
power8 and power9.

- Chuck