Index: /trunk/dports/lang/gcc47/Portfile
===================================================================
--- /trunk/dports/lang/gcc47/Portfile	(revision 97743)
+++ /trunk/dports/lang/gcc47/Portfile	(revision 97744)
@@ -53,4 +53,6 @@
 
 patchfiles          ppc_fde_encoding.diff
+patch.dir           ${workpath}/gcc-${version}
+
 patch.dir           ${workpath}/gcc-${version}
 
@@ -125,5 +127,10 @@
     # Revision subport separately from port for now in order to not force
     # rebuilds of gcc while ironing out the wrinkles in libstdcxx
-    revision 100
+    revision 101
+
+    # We might want to consider adding this patch to the gcc subport as well
+    # since it removes stuff that doesn't really make sense in the context of
+    # MacPorts
+    patchfiles-append  no-runtime-stubs.patch
 
     depends_run-delete path:lib/.libstdcxx:libstdcxx
@@ -163,7 +170,4 @@
             }
         }
-
-        # Some linkers don't optimize this unused link away.  TODO: Fix this in the build system
-        system "install_name_tool -change ${prefix}/lib/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib"
     }
 } else {
Index: /trunk/dports/lang/gcc47/files/no-runtime-stubs.patch
===================================================================
--- /trunk/dports/lang/gcc47/files/no-runtime-stubs.patch	(revision 97744)
+++ /trunk/dports/lang/gcc47/files/no-runtime-stubs.patch	(revision 97744)
@@ -0,0 +1,34 @@
+--- gcc/config/darwin.h.orig	2012-09-13 20:20:33.000000000 -0700
++++ gcc/config/darwin.h	2012-09-13 20:23:03.000000000 -0700
+@@ -325,17 +325,8 @@ extern GTY(()) int darwin_ms_struct;
+ #undef REAL_LIBGCC_SPEC
+ #define REAL_LIBGCC_SPEC						   \
+    "%{static-libgcc|static: -lgcc_eh -lgcc;				   \
+-      shared-libgcc|fexceptions|fgnu-runtime:				   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4)	   \
+-       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)	   \
+-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)	   \
+-       -lgcc ;								   \
+-      :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
+-       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)	   \
+-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)	   \
+-       -lgcc }"
++      shared-libgcc|fexceptions|fgnu-runtime: -lgcc;			   \
++      : -lgcc }"
+ 
+ /* We specify crt0.o as -lcrt0.o so that ld will search the library path.
+ 
+--- libgcc/config/t-slibgcc-darwin.orig	2012-09-13 20:26:11.000000000 -0700
++++ libgcc/config/t-slibgcc-darwin	2012-09-13 20:27:08.000000000 -0700
+@@ -39,7 +39,7 @@ endif
+ 
+ LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+ LGCC_FILES += $(LGCC_STUBS)
+-LEXT_STUBS = libgcc_ext.10.4$(SHLIB_EXT) libgcc_ext.10.5$(SHLIB_EXT)
++LEXT_STUBS =
+ LGCC_FILES += $(LEXT_STUBS)
+ INSTALL_FILES=$(LGCC_FILES)
+ 
+
Index: /trunk/dports/lang/gcc48/Portfile
===================================================================
--- /trunk/dports/lang/gcc48/Portfile	(revision 97743)
+++ /trunk/dports/lang/gcc48/Portfile	(revision 97744)
@@ -39,4 +39,6 @@
 
 depends_skip_archcheck-append gcc_select ld64 cctools
+
+patch.dir           ${workpath}/gcc-${version}
 
 set major           4.8
@@ -106,5 +108,10 @@
     # Revision subport separately from port for now in order to not force
     # rebuilds of gcc while ironing out the wrinkles in libstdcxx
-    revision 100
+    revision 101
+
+    # We might want to consider adding this patch to the gcc subport as well
+    # since it removes stuff that doesn't really make sense in the context of
+    # MacPorts
+    patchfiles-append  no-runtime-stubs.patch
 
     depends_run-delete port:${subport}
@@ -144,7 +151,4 @@
             }
         }
-
-        # Some linkers don't optimize this unused link away.  TODO: Fix this in the build system
-        system "install_name_tool -change ${prefix}/lib/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib"
     }
 } else {
Index: /trunk/dports/lang/gcc48/files/no-runtime-stubs.patch
===================================================================
--- /trunk/dports/lang/gcc48/files/no-runtime-stubs.patch	(revision 97744)
+++ /trunk/dports/lang/gcc48/files/no-runtime-stubs.patch	(revision 97744)
@@ -0,0 +1,34 @@
+--- gcc/config/darwin.h.orig	2012-09-13 20:20:33.000000000 -0700
++++ gcc/config/darwin.h	2012-09-13 20:23:03.000000000 -0700
+@@ -325,17 +325,8 @@ extern GTY(()) int darwin_ms_struct;
+ #undef REAL_LIBGCC_SPEC
+ #define REAL_LIBGCC_SPEC						   \
+    "%{static-libgcc|static: -lgcc_eh -lgcc;				   \
+-      shared-libgcc|fexceptions|fgnu-runtime:				   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4)	   \
+-       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)	   \
+-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)	   \
+-       -lgcc ;								   \
+-      :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
+-       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
+-       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)	   \
+-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)	   \
+-       -lgcc }"
++      shared-libgcc|fexceptions|fgnu-runtime: -lgcc;			   \
++      : -lgcc }"
+ 
+ /* We specify crt0.o as -lcrt0.o so that ld will search the library path.
+ 
+--- libgcc/config/t-slibgcc-darwin.orig	2012-09-13 20:26:11.000000000 -0700
++++ libgcc/config/t-slibgcc-darwin	2012-09-13 20:27:08.000000000 -0700
+@@ -39,7 +39,7 @@ endif
+ 
+ LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+ LGCC_FILES += $(LGCC_STUBS)
+-LEXT_STUBS = libgcc_ext.10.4$(SHLIB_EXT) libgcc_ext.10.5$(SHLIB_EXT)
++LEXT_STUBS =
+ LGCC_FILES += $(LEXT_STUBS)
+ INSTALL_FILES=$(LGCC_FILES)
+ 
+
