Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

danielktdoranie

macrumors member
Original poster
Jul 28, 2021
42
25
I would like to compile source code for my PowerPC G4 Macs using my MacBook Air (M1, 2020) anyone know of a good cross compiler? I am a newbie to compiling code but being as my PowerBook G4 15" (2005 PowerBook5,4) is slow AF to compile code cross compiling interests me.

I found OSXCROSS but and I understand it will at least compile code for G4 Macs running Mac OS X 10.5 Leopard but I don't know if it runs on a MacBook Air (M1, 2020) with macOS Sonoma 14.3

Any suggestions?
 

bzgnyc2

macrumors regular
Dec 8, 2023
123
147
I think the most likely paths to success are going to be getting recent versions of GNU C to cross-compile to MacOS X PPC/10.5/Leopard or getting LLVM 7 to run under macOS 14/Sonoma.

I don't know OSXCROSS but a quick glance at the GitHub suggests Thomas has two parallel efforts going on:
1. GNU C 5.5 toolchain running under Linux targeting PPC/macOS 10.5 (not sure why GNU C 5.5 and not newer ones used -- at first glance looks like PPC support has been retained up through at least GNU C 12)
2. LLVM toolchain running Linux targeting recent macOS (i386 - ARM)

Since LLVM 8 dropped support for mac/PPC, my guess is that the work done as part of #2 won't be helpful to you (maybe a few tips across the instructions/documentation that you can repurpose but can't tell). However, I believe what you want to do should be possible either using directly or for inspiration #1 as a start and pursuing one of the two paths I mentioned. May require quite a bit of elbow grease...

I am curious, is this purely for fun or do you have a business reason to targeting PowerPC/MacOS X?
 
  • Like
Reactions: Chuckeee

danielktdoranie

macrumors member
Original poster
Jul 28, 2021
42
25
Thanks for your reply and advice, I will certainly take that advice on.

I am curious, is this purely for fun or do you have a business reason to targeting PowerPC/MacOS X?

Oh my interest is purely for autodidactic purposes. Could anyone actually make money with new PowerPC Mac software? Ha ha.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.