Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-04-11 12:27:54


Peter Dimov wrote:
>> The tests for sched_yield and nanosleep now fail as expected on
>> g++/Sun. :-)
>> clock_gettime also fails to link across the board.
>>
>> I think that we ought to fix this by adding -lrt even in
>> <threading>single instead of #undef-ing the feature macros, since
>> these calls aren't technically tied to threads.
>
> How about this one?

These aren't really threading API's, so I guess they're either present or
not right?

In which case adding -lrt on platforms that require seems to be the right
thing to do, the following patch should do the job, but I don't have a
machine handy to test it on, can you check this on Linux at least?

Cheers, John.

Index: build/v2/tools/gcc.jam
===================================================================
--- build/v2/tools/gcc.jam (revision 44056)
+++ build/v2/tools/gcc.jam (working copy)
@@ -712,7 +712,7 @@
     case SunOS* :
         {
         flags gcc OPTIONS <threading>multi : -pthreads ;
- flags gcc FINDLIBS-SA <threading>multi : rt ;
+ flags gcc FINDLIBS-SA : rt ;
         }
     case BeOS :
         {
@@ -740,7 +740,7 @@
     case * :
         {
         flags gcc OPTIONS <threading>multi : -pthread ;
- flags gcc FINDLIBS-SA <threading>multi : rt ;
+ flags gcc FINDLIBS-SA : rt ;
         }
     }
 }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk