Index: tools/build/v2/tools/darwin.jam
===================================================================
--- tools/build/v2/tools/darwin.jam	(revision 75891)
+++ tools/build/v2/tools/darwin.jam	(working copy)
@@ -97,6 +97,10 @@
     
     # The version as reported by the compiler
     local real-version ;
+
+    # Is this is the apple exectuable
+    # Assume it is by default.
+    local is-apple = yes ;
     
     # - Autodetect the root and bin dir if not given.
     if $(command)
@@ -123,10 +127,18 @@
         real-version = [ MATCH "^([0-9.]+)"
             : [ SHELL "$(command-string) -dumpversion" ] ] ;
         version ?= $(real-version) ;
+
+        # - Detect if this is the MacPorts gcc
+        if [ MATCH "^(g[c+][c+]-mp-)" : [ SHELL "$(command-string) --version" ] ]
+        {
+            is-apple = ;
+        }
     }
     
     .real-version.$(version) = $(real-version) ;
-    
+
+    .is-apple.$(version) = $(is-apple) ;
+
     # - Define the condition for this toolset instance.
     local condition =
         [ common.check-init-parameters darwin $(requirement) : version $(version) ] ;
@@ -379,6 +391,7 @@
     local address-model = [ $(ps).get <address-model> ] ;
     local osx-version = [ $(ps).get <macosx-version> ] ;
     local gcc-version = [ $(ps).get <toolset-darwin:version> ] ;
+    local is-apple = $(.is-apple.$(gcc-version)) ;
     gcc-version = $(.real-version.$(gcc-version)) ;
     local options ;
     
@@ -406,6 +419,10 @@
     {
         case combined : 
         {
+            if ! $(is-apple) {
+                errors.user-error "Combined compilation is only supported for apple's gcc" ;
+            }
+
             if $(address-model) = 32_64 {
                 if $(support-ppc64) {
                     options = -arch i386 -arch ppc -arch x86_64 -arch ppc64 ;                    
@@ -427,11 +444,25 @@
         case x86 : 
         {
             if $(address-model) = 32_64 {
+                if ! $(is-apple) {
+                    errors.user-error "Combined compilation is only supported for apple's gcc" ;
+                }
+
                 options = -arch i386 -arch x86_64 ;
             } else if $(address-model) = 64 {
-                options = -arch x86_64 ;
+                if $(is-apple) {
+                    options = -arch x86_64 ;
+                }
+                else {
+                    options = -march=i686 -m64 ;
+                }
             } else {
-                options = -arch i386 ;
+                if $(is-apple) {
+                    options = -arch i386 ;
+                }
+                else {
+                    options = -march=i686 -m32 ;
+                }
             }
         }        
         
@@ -444,11 +475,25 @@
             }
             
             if $(address-model) = 32_64 {
+                if ! $(is-apple) {
+                    errors.user-error "Combined compilation is only supported for apple's gcc" ;
+                }
+
                 options = -arch ppc -arch ppc64 ;
             } else if $(address-model) = 64 {
-                options = -arch ppc64 ;
+                if $(is-apple) {
+                    options = -arch ppc64 ;
+                }
+                else {
+                    options = -march=powerpc64 ;
+                }
             } else {
-                options = -arch ppc ;
+                if $(is-apple) {
+                    options = -arch ppc ;
+                }
+                else {
+                    options = -march=powerpc ;
+                }
             }
         }
         
