You can install a custom gcc, and then tune gcc_select and its configuration files to support it. It's been while since I've done this, but I did it when I was trying to use a version of gcc that was later than that supported by the most up-to-date Xcode available for OSX Tiger. Worked fine, and worked through Xcode.