[cfe-dev] libstdc++ Windows port

Howard Hinnant hhinnant at apple.com
Thu Mar 8 07:00:24 PST 2012


On Mar 8, 2012, at 9:28 AM, Matthew Faithfull wrote:

> Can anyone fill me in on the status of pthreads dependency in stdc++. As 
> far as I can tell the current situation is as follows:-
> The libstdc++ Windows port uses MinGW, MinGW doesn't have pthreads 
> support out of the box, so do we need a special MinGW?
> The obvious alternative, installing 'pthreads for Windows', doesn't work 
> due to that project being out of date (2006) and the fundamental types 
> being incompatible. for example pthread_t is a struct under ptw32 and a 
> pointer under OSX.
> Using the OSX pthreads header(s) may enable compilation to complete ( I 
> haven't tried it ) but would then need a new OSX ABI compatible port of 
> pthreads to Windows in order to work. Is this in the works or are there 
> other plans afoot to get around the issue?
> A full new Windows port of pthreads is by my very approximate reckoning 
> a minimum 3 months full time work so I'm not about to jump in if it 
> isn't going to be useful.

Do you mean libc++ (http://libcxx.llvm.org/)?

My recommendation would be to map the C++11 <thread>/<condition_variable>/<mutex> to the native Windows API as closely as possible, rather than go through the additional pthreads abstraction layer.

Howard




More information about the cfe-dev mailing list