[Development] Dropping MinGW support in Qt 6 (Was: HEADS-UP: QStringLiteral)

Kevin Kofler kevin.kofler at chello.at
Thu Aug 22 02:17:17 CEST 2019


Thiago Macieira wrote:
> The same code compiled with the GCC/MinGW 8.2 that I have on my openSUSE
> system. (I'd have tested GCC/MinGW on Windows, but the terminal and/or
> bash refuse to paste text) I don't know when GCC implemented the
> functionality.

Looks like it already works with 7.3.0:
[kevin at desktop64 ~]$ cat >mingw-tls-test.cc <<EOF
> struct S { S(); ~S(); };
> 
> void f()
> {
>     thread_local S s;
> }
> EOF
[kevin at desktop64 ~]$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (GCC) 7.3.0 20180125 (Fedora MinGW 7.3.0-1.fc28)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[kevin at desktop64 ~]$ x86_64-w64-mingw32-g++ -O2 -c mingw-tls-test.cc
[kevin at desktop64 ~]$ ls -l mingw-tls-test.o
-rw-rw-r-- 1 kevin kevin 1323 22. Aug 01:56 mingw-tls-test.o

(Obviously, this does not link, because there are no implementations of the 
constructor and destructor and no main function.)

In any case, it is good news that this seems to be solved already, because:

> So let me instead change my request:
> Can we require GCC 8 for MinGW for Qt 5.15?

This is a much more reasonable request than the original one.

For what it's worth, the oldest still supported Fedora release (Fedora 29) 
has a cross-MinGW-w64 GCC 8.3.0. (My machine with 7.3.0 is out of date and 
scheduled (by me) to be upgraded tomorrow, so you're lucky that I was still 
able to easily test that version today. ;-) ) So requiring GCC 8 should be 
fine from our side (even though it looks like GCC 7 would be enough, maybe 
even an earlier version).

On the other hand, dropping MinGW support entirely would be a really bad 
idea IMHO, considering that Visual C++ does not support cross-compilation 
and also that there seems to be no non-buggy version of Visual C++ available 
at this time. (You want to get rid of VC++2015 for being unsupported and 
VC++2017 for being buggy, yet also cannot recommend VC++2019 due to new code 
generation bugs.) For me, it would mean that I would no longer be able to 
build my Qt code for Windows with the current upstream Qt and would have to 
either stick to an old Qt or patch it. So please keep MinGW support (with a 
reasonable minimum GCC version requirement, as discussed above)!

        Kevin Kofler




More information about the Development mailing list