[Self-interest] Self on PPC

Russell Allen mail at russell-allen.com
Sat Feb 18 23:20:16 UTC 2023

Hi guys
As a followup, I've got a small python script which leverages qemu to build 
the VM in a sort-of-reproducible way using uwe's work: 
I've built running VM's from his work for NetBSD/i386 and FreeBSD/i386, 
though there is a bunch of cmake magic which isn't quite working (eg 
FreeBSD takes forever to compile because PCH isn't happening)
As uwe says, the aim is to get this all into dev (and then into a release)
Cheers Russell
Valery Ushakov wrote:
I have spent a couple of evenings kicking the source tree to get it to
compile on NetBSD/macppc, hoping for some low-hanging fruits to fall.
I see from the history that the port was removed but then David rolled
that change back, so I guess it's not entirely unwanted.
I pushed the results to github:
This branch is off the feature/netbsd-i386 branch that Russell might
hopefully merge to dev.
The changes are confined to the ppc subdir except for bringing back
ppc support in cmake files and one small tweak to netbsd-specific
kludge in allocation.cpp. These changes should not affect i386 builds
in any way.
One manual kludge I have to use to build the tree is to compile only
the search_ppc.cpp file with -maltivec - my cmake-fu is non existent,
so I don't know how to do express that properly.
(I tried to keep macosx/ppc parts intact. I guess I can eventually
set up macos on an external drive - I have the retail dvd for the last
version that supported ppc - and see if it compiles, but I guess the
demand for that is vanishingly small and I'd rather sink my not so
copious free time into making it actually work on netbsd. :)
The resulting binary doesn't work - not that I expected it to. After
I had time to look past the surface level problems of making it to
compile, I see that the frame code is written for the macos ABI:
Inside Macintosh: Introduction to PowerPC System Software, 1-44

so of course that doesn't work on ELF ABI with a different stack frame
Adapting to ELF ABI (while, ideally, not breaking macos) is a bit too
much for my current time budget. I realize there's probably not much
practical demand for the working ppc port, but doing these changes was
quick and easy, didn't break anything (hopefully) and that leaves it
in a batter shape. So on an off chance that someone might be
interested in picking this up, the tree is in a mostly buildable
state. Broken windows theory and all that...
Self-interest mailing list
Self-interest at lists.selflanguage.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20230218/57f96cdc/attachment.html>

More information about the Self-interest mailing list