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

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,129
2,392
Download
=MacPorts GCC 4.9 Binary Installer For PowerPC Mac OS X Tiger
Put together by Alex Free. Release 1, 11/25/2020.

=Background
GNU GCC 4.9 requires many dependencies and bootstrap compilers when compiling completely from source using MacPorts for PowerPC Mac OS X 10.4 Tiger. All together, compiling this can easily take a day or 2.

This installer on the other hand takes just under 2 hours on my Mac to install everything. Essentially, the installer temporarily changes the MacPorts configuration files to use a local source for obtaining the ports tree and binary archives. After doing so, the ports tree is synced, binaries are installed, all changes are reverted, and finally the ports tree is synced with MacPorts proper. Your system remains untouched, besides the addition of the new compiler and it's dependencies.

=Disclaimer
- The following MacPorts ports will be automatically uninstalled if they are found to be installed:

apple-gcc42 cctools cloog gcc_select gettext gmp gpref isl isl18 ld64 ld64-97 libgcc7 libgcc6 libiconv libmacho-headers libmpc libunwind-headers mpfr ncurses xz zlib gcc49

This is because this installer will install them. At the end of the install, 'port sync' will also be run, updating your ports tree.

=Requirements
- Mac OS X 10.4.11 PowerPC (Should also work on Leopard, and be able to compile for Tiger from Leopard).
- Xcode 2.5 (The last Xcode released for Tiger, although nothing will be compiled).
- MacPorts 2.0.0 or newer installed.

=Steps
- Open Terminal.app.
- Using sudo, execute the 'install' file in this release ('sudo ./install').
- Wait (Took 2 hours on my Mac mini).

When done, you can select your GCC 4.9 compiler using the command 'sudo port select --set gcc mp-gcc49'. Then, you can check with the command 'gcc --version'.
 
Thanks for doing this. So installing will get Xcode to use gcc 4.9?
 
I've just found this thread thanks to this post. Now I'm excited to try this. This should possibly make ports that fail to build, work. Is that correct?
Technically yes, but you may have to force ports to use the newer compiler (macports blacklists certain compilers including this one, but some ports allow you to build with it and I believe you can override this setting somewhere). I don't really like package managers anyways, my main goal was to build sm64ex with this but there is a lot of C11 software out in the world now where this could come in handy.

There actually is a GCC 7.4 port in TigerPorts by kencu which gives us PowerPC Mac users a C17 compiler! I just didn't know about it till after releasing this.

Let me know if you have any more questions..!

There is so much life left in these machines and operating systems we love it's insane.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.