Boost logo

Boost :

Subject: Re: [boost] clang toolset on mingw passes -mthreads instead of -pthread
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-06-12 21:06:46


On 6/11/2014 3:16 PM, Peter Dimov wrote:
> Can someone who is familiar with Boost.Build please look at the Clang
> toolset and figure out how can it be persuaded to use the correct
> -pthread option instead of -mthreads under Windows/MinGW?

I am away from my home computer right now but I will push a local branch
of Boost Build for clang under Windows/mingw when I get back ( another
week ).

I am not a Boost Build expert so whatever little I have done is just a
hack based on others.

I tried to get the Boost Build people interested in toolsets for clang
on Windows in the past, but without success. Maybe you will be more
successful. I wanted both a toolset for clang Windows/VC++ and clang
Windows/mingw.

The basic hack of clang Windows/mingw is to take 'rule setup-threading'
from gcc.jam, add it to clang-linux.jam, change 'case windows : option =
-mthreads ;' to 'case windows : option = -pthread ;', and then change
every invocation in clang=linux.jam of 'gcc.setup-threading' to just
'setup=threading'.


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