These patches were updated 2 Oct. 2009 (to g77 version grh-6). The compiler built using the previous patches would sometimes fail to compile programs unless some optimization was invoked (-O0 or higher). The present patch set repairs that problem, and also yields smaller executables for debug compiles (-g) when COMMON is extensively used. For further information, see the ChangeLog in the patch file.
The build also works on Power PC systems prior to 10.6. With the 10.6 release, MacOS became Intel-only, and PPC support was dropped.
cd /usr/local/src; tar xfz gcc-3.4.3.tar.gz
cd /usr/local/src; patch -p0 < /tmp/gcc-3.4.3.diffs
mkdir /usr/local/src/gcc-3.4.3-darwin cd /usr/local/src/gcc-3.4.3-darwin ../gcc-3.4.3/configure --enable-languages=f77 --disable-sharedThis will configure GCC to build only an f77/g77 compiler.
make STAGE1_CFLAGS='-m32 -D_FORTIFY_SOURCE=0' \ BOOT_CFLAGS='-m32 -D_FORTIFY_SOURCE=0' \ CFLAGS='-O -fno-common -m32 -D_FORTIFY_SOURCE=0' \ LIBCFLAGS='-g -O2 -fno-common -m32 -D_FORTIFY_SOURCE=0' \ LIBCXXFLAGS='-g -O2 -m32 -fno-implicit-templates -D_FORTIFY_SOURCE=0' \ bootstrapThis will build the compilers and will take about 15 minutes. If all looks ok, install them:
make installThis will leave g77 in /usr/local/bin. Make sure that is in your search path. You should be able to say,
g77 -v ... gcc version 3.4.3 (grh-6)