Just to clarify that I understand the process:
The GCC implementation of <thread> and friends (part of the libc or libgcc
or libstdc++ or whatever the GCC standard library is called) really uses
pthread calls under the hood. Changing that would mean changing the code of
the standard library implementation. So in order to use those headers, an
implementation of pthreads needs to exist and be available to the linker =>
winpthreads. Is this correct?

I assume that these builds automatically have -lwinpthreads or whatever the
correct name is added to the linking command, since it would be needed for
every compilation? Does just using a static CRT give me a static
winpthreads, too, or are they separate?

Would having one build with winpthreads bundled into the libstdc++.dll (or
whatever it is) not work?


On Tue, Apr 2, 2013 at 12:38 PM, Ruben Van Boxem
<vanboxem.ru...@gmail.com>wrote:

> 2013/4/2 Baruch Burstein <bmburst...@gmail.com>
>
>> Can you explain the difference from your "regular" builds? Does
>> std::thread not work with them? If I use std::thread, do I need to
>> link/distribute any additional libraries? Or are there special licenses
>> issues?
>> In short: Why 2 separate builds?
>>
>
> std::thread (and other stuff like <mutex>) only works on the builds
> labeled "stdthread'. The difference is that gcc is built based on the posix
> threading model using the winpthreads library. The result is a libstdc++
> that has multithreading functionality. The affected headers are <thread>,
> <mutex>, <condition_variable>, and <future>. <atomic> has always worked and
> will continue to work without posix threading.
>
> You will need to additionally distribute the winpthreads dll if you do not
> link statically. There are no licensing issues, as the winpthreads code is
> placed in the Public Domain in the same way the rest of the MinGW-w64
> headers and crt are.
>
> The two builds are incompatible due to the difference in libgcc. All code
> has to be recompiled with the same toolchain.
>
> I have two builds because currently enabling posix threading (like in the
> std::thread builds) makes libgcc depend on winpthreads. This is not a
> problem for most people, but it does make even C code not using pthreads
> that depends on libgcc (pretty much all code compiled by gcc depends on
> libgcc), depend on winpthreads as well.
>
> Ruben
>
>
>>
>> On Tue, Mar 26, 2013 at 9:02 PM, Ruben Van Boxem <
>> vanboxem.ru...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have uploaded a new GCC 4.8 experimental std::thread build. Nothing
>>> fundamentally changed since the previous posix-threaded builds.
>>>
>>> Enjoy,
>>>
>>> Ruben
>>>
>>> Find the goodies here:
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Toolchain%20sources/Personal%20Builds/rubenvb/experimental/
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-experimental-stdthread/
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-experimental-stdthread/
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
>>> Rise to greatness in Intel's independent game demo contest.
>>> Compete for recognition, cash, and the chance to get your game
>>> on Steam. $5K grand prize plus 10 genre and skill prizes.
>>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
>>> _______________________________________________
>>> Mingw-w64-public mailing list
>>> Mingw-w64-public@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>>
>>>
>>
>>
>> --
>> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
>>
>>
>> ------------------------------------------------------------------------------
>> Own the Future-Intel(R) Level Up Game Demo Contest 2013
>>
>> Rise to greatness in Intel's independent game demo contest. Compete
>> for recognition, cash, and the chance to get your game on Steam.
>> $5K grand prize plus 10 genre and skill prizes. Submit your demo
>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
>>
>> _______________________________________________
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>
>
> ------------------------------------------------------------------------------
> Own the Future-Intel(R) Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest. Compete
> for recognition, cash, and the chance to get your game on Steam.
> $5K grand prize plus 10 genre and skill prizes. Submit your demo
> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>


-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to