Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-04 Thread Martin Storsjö

On Thu, 5 Mar 2020, Liu Hao wrote:


在 03/05/2020 10:46 AM, Dan Raymond 写道:

On 3/3/2020 6:16 AM, Liu Hao wrote:


There are prebuilt native toolchains so you can have GCC, GDB etc. as
native programs which do not require MSYS2 (note GDB may require Python3
which is native too) so there is no need to install MSYS2, unless you
also need GNU make, BASH, etc.


I am running mingw32-make without MSYS2.  Isn't that GNU make?




Ah yes, apologies for the oversight. mingw32-make is the CMD-based GNU
make variant, which understands batch syntax rather than shell syntax. I
used to believe that very few people would use mingw32-make rather than
Cygwin/MSYS2 make which accepts Unix Makefiles.


I'd agree that it's fairly rare, but e.g. CMake can generate makefiles for 
this case, and the same goes for Qt's qmake.


// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-04 Thread Liu Hao
在 03/05/2020 10:46 AM, Dan Raymond 写道:
> On 3/3/2020 6:16 AM, Liu Hao wrote:
> 
>> There are prebuilt native toolchains so you can have GCC, GDB etc. as
>> native programs which do not require MSYS2 (note GDB may require Python3
>> which is native too) so there is no need to install MSYS2, unless you
>> also need GNU make, BASH, etc.
> 
> I am running mingw32-make without MSYS2.  Isn't that GNU make?
> 
> 

Ah yes, apologies for the oversight. mingw32-make is the CMD-based GNU
make variant, which understands batch syntax rather than shell syntax. I
used to believe that very few people would use mingw32-make rather than
Cygwin/MSYS2 make which accepts Unix Makefiles.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-04 Thread Dan Raymond

On 3/3/2020 6:16 AM, Liu Hao wrote:


There are prebuilt native toolchains so you can have GCC, GDB etc. as
native programs which do not require MSYS2 (note GDB may require Python3
which is native too) so there is no need to install MSYS2, unless you
also need GNU make, BASH, etc.


I am running mingw32-make without MSYS2.  Isn't that GNU make?



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 下午11:42, Carl Kleffner 写道:
> BTW,
> 
> what happend to https://github.com/lhmouse/mcfgthread? Is this a possible
> usable fast posix alternative?
> 

As it has introduced a new thread model, it is not compatible with
either posix or win32.e

Mutexes, condition variables and once-guards are implemented with native
syscalls, which are supposed to lightweight. But other features such as
barriers, affinity control etc. have not been implemented. It looks like
libgcc doesn't need them.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Vincent Torri
On Tue, Mar 3, 2020 at 4:10 PM Liu Hao  wrote:
>
> 在 2020/3/3 23:01, Vincent Torri 写道:
> >
> > but technically speaking, it can be implemented with the native
> > condition variables, right ?
> >
>
>
> No. See
> 
> for mutex details.
>
> The native condition variables can only be used along with native
> critical sections or slim readers-writer locks. Re-implementing them
> would cause ABI breakage.

i understand, thank you

Vincent Torri


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Carl Kleffner
BTW,

what happend to https://github.com/lhmouse/mcfgthread? Is this a possible
usable fast posix alternative?

Carl

Am Di., 3. März 2020 um 16:10 Uhr schrieb Liu Hao :

> 在 2020/3/3 23:01, Vincent Torri 写道:
> >
> > but technically speaking, it can be implemented with the native
> > condition variables, right ?
> >
>
>
> No. See
> <
> https://github.com/gcc-mirror/gcc/blob/8e6d0dba166324f4b257329bd4b4ddc2b4522359/libgcc/config/i386/gthr-win32.c#L147
> >
> for mutex details.
>
> The native condition variables can only be used along with native
> critical sections or slim readers-writer locks. Re-implementing them
> would cause ABI breakage.
>
>
>
> --
> Best regards,
> LH_Mouse
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Vincent Torri
On Tue, Mar 3, 2020 at 3:59 PM Liu Hao  wrote:
>
> 在 2020/3/3 22:44, Vincent Torri 写道:
> >
> > can you be a bit more precise about "libgcc doesn't implement
> > condition variables for win32 model" please ?
> >
> > Vincent Torri
> >
>
> See
> .

but technically speaking, it can be implemented with the native
condition variables, right ?

Vincent Torri


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 23:01, Vincent Torri 写道:
> 
> but technically speaking, it can be implemented with the native
> condition variables, right ?
> 


No. See

for mutex details.

The native condition variables can only be used along with native
critical sections or slim readers-writer locks. Re-implementing them
would cause ABI breakage.



-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 22:44, Vincent Torri 写道:
> 
> can you be a bit more precise about "libgcc doesn't implement
> condition variables for win32 model" please ?
> 
> Vincent Torri
> 

See
.




-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Vincent Torri
On Tue, Mar 3, 2020 at 2:46 PM Liu Hao  wrote:
>
> 在 2020/3/3 21:30, Vincent Torri 写道:
> > On Tue, Mar 3, 2020 at 2:17 PM Liu Hao  wrote:
> >>
> >>
> >> The posix/win32 diversity is about how to manipulate threads (there are
> >> a few more): via libwinpthread (slow but feature-complete) or via
> >> Windows APIs directly (fast but without condition variables etc.).
> >
> > but since Vista, it seems that condition variables exist:
> >
> > https://docs.microsoft.com/en-us/windows/win32/sync/condition-variables
> >
> > Vincent Torri
> >
> >
>
> Yes and no - libgcc doesn't implement condition variables for win32
> model, so they don't exist there.

can you be a bit more precise about "libgcc doesn't implement
condition variables for win32 model" please ?

Vincent Torri


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 21:25, Luiz Emediato 写道:
> I have installed MinGW64 x86_64-posix-seh binaries but it won't run
> configure.
> Do I need MSYS2 in order to run configure ?
> 

[Please CC the list. I include the previous message here because it was
sent to me solely.]

Then yes, because configure is a shell script.

The GNU build system requires MSYS2. Some other alternatives such as
CMake with Ninja backend don't.



> On Tue, Mar 3, 2020 at 10:17 AM Liu Hao  > wrote:
> 
> 在 2020/3/3 21:02, Luiz Emediato 写道:
> > Hi there,
> >
> > Would you please help me answering the following questions?
> >
> > 1. What is the difference between x86_64-posix-seh and
> x86_64-win32-seh
> > binaries ?
> > Is the former for Linux and the latter for Windows ?
> >
> > 2. What is the best way to install MingGW64? Is MSYS2 also necessary ?
> >
> 
> 
> The posix/win32 diversity is about how to manipulate threads (there are
> a few more): via libwinpthread (slow but feature-complete) or via
> Windows APIs directly (fast but without condition variables etc.).
> 
> There are prebuilt native toolchains so you can have GCC, GDB etc. as
> native programs which do not require MSYS2 (note GDB may require Python3
> which is native too) so there is no need to install MSYS2, unless you
> also need GNU make, BASH, etc.
> 
> 
> -- 
> Best regards,
> LH_Mouse
> 




-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 21:30, Vincent Torri 写道:
> On Tue, Mar 3, 2020 at 2:17 PM Liu Hao  wrote:
>>
>>
>> The posix/win32 diversity is about how to manipulate threads (there are
>> a few more): via libwinpthread (slow but feature-complete) or via
>> Windows APIs directly (fast but without condition variables etc.).
> 
> but since Vista, it seems that condition variables exist:
> 
> https://docs.microsoft.com/en-us/windows/win32/sync/condition-variables
> 
> Vincent Torri
> 
> 

Yes and no - libgcc doesn't implement condition variables for win32
model, so they don't exist there.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Vincent Torri
On Tue, Mar 3, 2020 at 2:17 PM Liu Hao  wrote:
>
> 在 2020/3/3 21:02, Luiz Emediato 写道:
> > Hi there,
> >
> > Would you please help me answering the following questions?
> >
> > 1. What is the difference between x86_64-posix-seh and x86_64-win32-seh
> > binaries ?
> > Is the former for Linux and the latter for Windows ?
> >
> > 2. What is the best way to install MingGW64? Is MSYS2 also necessary ?
> >
>
>
> The posix/win32 diversity is about how to manipulate threads (there are
> a few more): via libwinpthread (slow but feature-complete) or via
> Windows APIs directly (fast but without condition variables etc.).

but since Vista, it seems that condition variables exist:

https://docs.microsoft.com/en-us/windows/win32/sync/condition-variables

Vincent Torri


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Liu Hao
在 2020/3/3 21:02, Luiz Emediato 写道:
> Hi there,
> 
> Would you please help me answering the following questions?
> 
> 1. What is the difference between x86_64-posix-seh and x86_64-win32-seh
> binaries ?
> Is the former for Linux and the latter for Windows ?
> 
> 2. What is the best way to install MingGW64? Is MSYS2 also necessary ?
> 


The posix/win32 diversity is about how to manipulate threads (there are
a few more): via libwinpthread (slow but feature-complete) or via
Windows APIs directly (fast but without condition variables etc.).

There are prebuilt native toolchains so you can have GCC, GDB etc. as
native programs which do not require MSYS2 (note GDB may require Python3
which is native too) so there is no need to install MSYS2, unless you
also need GNU make, BASH, etc.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Posix versus Win32 binaries

2020-03-03 Thread Luiz Emediato
Hi there,

Would you please help me answering the following questions?

1. What is the difference between x86_64-posix-seh and x86_64-win32-seh
binaries ?
Is the former for Linux and the latter for Windows ?

2. What is the best way to install MingGW64? Is MSYS2 also necessary ?

Thanks a lot in advance.
Luiz

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public