Update Windows CI build and dependencies in MSYS2/MinGW build script.
Recent Windows builds fail to execute due to different versions of libstdc++ linked by the compiler/linker used in at projects build (MSYS2/MinGW) and the one that was used to compile/link QT (MinGW used for the official QT distribution).
For example, in pipeline https://gitlab.com/openconnect/openconnect-gui/-/jobs/10385118098 , the toolchain used from MSYS2/MinGW is GCC 15.1
The CXX compiler identification is GCC 15.1.0
and in QT is 11.2 ( https://wiki.qt.io/MinGW ).
As a result the program fail to run.
Furthermore, if the build is done against the same version used by the QT installation, the dependencies are provided by MSYS2/MinGW, so problems may arise from different versions used by the compiler/linker.
For example, both GnuTLS and QT depend on libwinpthreads.
A recent change on that library (reference the URL), broke compatibility between the 2 toochains (and, besides that, more issues could possibly arise).
As a result, a test build failed to run:
It seems that the only way forward is to use the same toolchain to build both the dependencies and the project, with the downside being that we are "restricted" to whatever version of QT is available from MSYS2/MinGW distribution. Which, IMHO, is not necessarily a bad thing, since MSYS2 frequently updates the QT distribution.
As a side effect, this MR brings in an issue that is not Windows specific, and fixes compilation against QT 6.10, which is the current version packaged in MSYS2/MinGW.
Checklist
-
Code modified for feature -
Documentation updated / CHANGELOG.md entry present (for non-trivial changes)
Reviewer's checklist:
-
Any issues marked for closing are addressed -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code

