$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r49011 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2008-09-29 12:09:34
Author: vladimir_prus
Date: 2008-09-29 12:09:34 EDT (Mon, 29 Sep 2008)
New Revision: 49011
URL: http://svn.boost.org/trac/boost/changeset/49011
Log:
Only add -pthread/-mthread when threading=multi.
Text files modified: 
   trunk/tools/build/v2/tools/gcc.jam |    98 ++++++++++++++++++++------------------- 
   1 files changed, 51 insertions(+), 47 deletions(-)
Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam	(original)
+++ trunk/tools/build/v2/tools/gcc.jam	2008-09-29 12:09:34 EDT (Mon, 29 Sep 2008)
@@ -774,58 +774,62 @@
 
 rule setup-threading ( targets * : sources * : properties * )
 {
-    local target = [ feature.get-values target-os : $(properties) ] ;
-    local option ;
-    local libs ;
-    
-    switch $(target)
-    {
-        case windows :
-        {
-            option = -mthreads ;
-        }
-        case cygwin :
-        {
-            option = -mthreads ;
-        }
-        case sunos :
-        {
-            option = -pthreads ;
-            libs = rt ;
-        }
-        case beos :
-        {            
-            # BeOS has no threading options, so do not set anything here.
-        }        
-        case *bsd :
-        {
-            option = -pthread ;
-            # There is no -lrt on BSD.
+    local threading = [ feature.get-values threading : $(properties) ] ;
+    if $(threading) = multi
+    {        
+        local target = [ feature.get-values target-os : $(properties) ] ;
+        local option ;
+        local libs ;
+        
+        switch $(target)
+        {
+            case windows :
+            {
+                option = -mthreads ;
+            }
+            case cygwin :
+            {
+                option = -mthreads ;
+            }
+            case sunos :
+            {
+                option = -pthreads ;
+                libs = rt ;
+            }
+            case beos :
+            {            
+                # BeOS has no threading options, so do not set anything here.
+            }        
+            case *bsd :
+            {
+                option = -pthread ;
+                # There is no -lrt on BSD.
+            }
+            case sgi :
+            {
+                # gcc on IRIX does not support multi-threading so do not set anything
+                # here.
+            }
+            case darwin :
+            {
+                # Darwin has no threading options so do not set anything here.
+            }
+            case * :
+            {
+                option = -pthread ;
+                libs = rt ;
+            }
         }
-        case sgi :
-        {
-            # gcc on IRIX does not support multi-threading so do not set anything
-            # here.
-        }
-        case darwin :
+    
+        if $(option)
         {
-            # Darwin has no threading options so do not set anything here.
+            OPTIONS on $(targets) += $(option) ;
         }
-        case * :
+        if $(libs)
         {
-            option = -pthread ;
-            libs = rt ;
+            FINDLIBS-SA on $(targets) = $(libs) ;
         }
-    }
-    
-    if $(option)
-    {
-        OPTIONS on $(targets) += $(option) ;
-    }
-    if $(libs)
-    {
-        FINDLIBS-SA on $(targets) = $(libs) ;
-    }
+    }    
 }
 
 local rule cpu-flags ( toolset variable : architecture : instruction-set + : values + : default ? )