Haiku PowerPC compatibility


Useful for running on BeOS itself… since that is where the dumping would have to happen as that machine can’t even run Haiku anyway. I guess the Haiku toolchain would build a compatible binary at least.


Not sure what you mean Mac G5s were discontinued 12 years ago… so they aren’t still being sold new.


I think you’re mixing things up here, it’s BeOS which supported PPC machines before G3. Haiku does not support much for now as it won’t compiler anyway. But once we fix it it shouldn’t be a problem for G4 & G5, since we now have enough documentation with Linux & *BSD ports anyway.


A GCC 2.95 PPC toolchain should be able to compile working binaries for PPC BeOS though right even though the kernel itself and userland from Haiku won’t run on them yet?

Supporting old machines is fine… but they just get more and more rare over time, and the Macs from that era especially the more integrated ones break and you can’t fix them.


No, for at least one reason, the current linker doesn’t properly support PEF. It says it does but it just outputs garbage. I started fixing it as I need a PEF file for the loader on the BeBox.
Maybe tweaking Retro68 would do, but for now I don’t plan to do much PPC BeOS dev anyway.


Ok that makes sense I remember you mentioning this now but I was thinking PEF was just the kernel.


Did you ever look at this?


BeOS PowerPC never used GCC. I don’t think GCC has ever properly supported the PEF… Mwcc was a big pain in the rear.


That looks a lot like elf2aout (used to make elfs bootable by openfirmware)… wonder how well it works.


It apparently was how they got the BeBox to boot BSD… I guess it only needs to work as well as that? I think what they did was as I suggested earlier in heer (or another thread related to this)… they made a small Big-Endian bfs volume, put this in place of the kernel, and bootstrapped the rest of the boot from that entry point.

One of the big issues with the way the legacy PowerPC appkit stuff work is that it is written in C++ and uses the MWCC libraries and name mangling. I messed around a lot with getting the legacy GCC that used to exist to work with more modern code. I wanted to get an assembler, but MW never had one on BeOS. In the end I started to implement one using VASM and the docs for MWCC Object format - because that was documented and easier than trying to get any info on PEF. But it’s a dead end for Haiku. I revisited the project a while back and got a lot of the code to dump the object format working in C# (I started again from scratch - I don’t have the original work I did as I think the hard drive died IIRC.) I have not touched the code in a while, but it is here: mwobdec


Oh I didn’t look at the NetBSD stuff, but yeah, I suppose I could use that instead of trying to fix ld. It was more of an exercise. I managed to generate a valid file although it wouldn’t load because it’s missing some stuff still.