[Mingw-w64-public] Thoughts on supporting the C++11 thread library on Windows

K. Frank kfrank29.c@gmail.com
Wed May 9 19:06:00 GMT 2012


Hi Jonathan!

On Wed, May 9, 2012 at 1:47 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 9 May 2012 16:58, K. Frank wrote:
>> ...
>> One note:  In my experimentation, I wrote some windows-api
>> threading programs and built them without specifying
>>  --enable-threads=win32, and they all seemed to work.,  So I
>> guess I don't understand what  --enable-threads=win32 is
>> supposed to do.
>
> You use it when GCC is *built* not when you invoke GCC. It sets the
> value shown for "Thread model" when you run "gcc -v"

Thanks.  Now I understand.

I am using one of Ruben's <thread>-enables 4.7.0 builds.  When I
run "gcc -v" I get

   --enable-threads=posix

and

   Thread model: posix

(and gcc version 4.7.0 20110829 (experimental) (GCC)) (among all
the other stuff).

> ...
> Maybe Ruben can confirm but I assume that can be used when GCC is
> built with --enable-threads=posix

Yes, as noted above, it appears that Ruben's build is built with
--enable-threads=posix.

However, as noted in my previous post, I have happily done some
(limited) windows-api threading programming with Ruben's build
(and also did the windows-api threading programming necessary
to implement <thread>), all, I guess, with a gcc build built using
--enable-threads=posix, so what then does --enable-threads=win32
actually do?

> ...

Thanks for your follow-up.


K. Frank



More information about the Libstdc++ mailing list