[haiku] Re: PowerPC BeOS R5 binary compatibility?

  • From: Chris Hanson <cmhanson@xxxxxxxxxxxxxxxxx>
  • To: "haiku@xxxxxxxxxxxxx" <haiku@xxxxxxxxxxxxx>
  • Date: Sat, 25 Apr 2015 19:06:58 -0700

On Apr 25, 2015, at 3:52 PM, François Revol <revol@xxxxxxx> wrote:

On 26/04/2015 00:31, Chris Hanson wrote:
Does Haiku maintain binary compatibility with BeOS R5 for PowerPC
CPUs, or just Intel CPUs?

Some cursory searches haven’t provided a direct answer. I’m mostly
interested because it would also mean it should be possible to
cross-compile… (Compiling anything on a 66 MHz BeBox feels pretty
slow these days.)

No, BeOS on PPC didn't even use the ELF format.

Right, it used Apple's PEF executable format, which is mechanically convertible
to/from XCOFF. (That's what both Apple and Be's MakePEF tools did.)

Other than using the CodeWarrior class layout and vtable format, the ABI is the
standard(rTOC-based PowerPC ABI, so it should be feasible to compile compatibly
for BeOS on PowerPC using gcc or clang with some minimal hacking.

I was mostly wondering if Haiku on PowerPC had done that hacking, since it was
done for Haiku on Intel.

Although it's theoretically possible to have Haiku ported to the BeBox,
but that's done yet, and it won't run BeOS binaries.

It's the "run BeOS binaries" part which matters to me rather than running Haiku
on BeBox, because of necessity running BeOS binaries also means generating code
that's binary-compatible. That in turn would mean it's possible to do fast
compiles. :)

FWIW there is a preliminary support for a BeBox target in a QEMU branch:

Cool! Not something I'd be allowed to help with, but nice to see.

-- Chris

Other related posts: