Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw: delete support for legacy mingw.org toolchain #11625

Closed
wants to merge 15 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 8, 2023

Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW:
https://en.wikipedia.org/wiki/MinGW, https://osdn.net/projects/mingw/
Its homepage used to be http://mingw.org/ [no HTTPS], and broken now.
It supported the x86 CPU only and used a old Windows API header and
implib set, often causing issues. It also misses most modern Windows
features, offering old versions of both binutils and gcc (no llvm/clang
support). It was last updated 2 years ago.

curl now relies on toolchains based on the mingw-w64 project:
https://www.mingw-w64.org/ https://sourceforge.net/projects/mingw-w64/
https://www.msys2.org/ https://github.com/msys2/msys2
https://github.com/mstorsjo/llvm-mingw
(Also available via Linux and macOS package managers.)

Closes #11625

@github-actions github-actions bot added the CI Continuous Integration label Aug 8, 2023
@vszakats
Copy link
Member Author

vszakats commented Aug 8, 2023

I may have missed some bits, feel free to update, or report.

Also, I'm uncertain if we announced this for 8.3.0 (released in September), or after 8.3.0. If the latter, feel free to flag it "next-feature-window".

@vszakats vszakats added build Windows Windows-specific labels Aug 8, 2023
@vszakats vszakats changed the title mingw: delete support for old/classic/legacy toolchain version mingw: delete support for old/classic/legacy toolchain edition Aug 8, 2023
@vszakats vszakats changed the title mingw: delete support for old/classic/legacy toolchain edition mingw: delete support for old/classic/legacy toolchain version Aug 8, 2023
@bagder
Copy link
Member

bagder commented Aug 8, 2023

The checks for __MINGW32__ that we have in the code, is that define set by any other versions than mingw v1? If so, we could remove all those.

The predef details seems to suggest that's only set by v1?

@bagder bagder added the feature-window A merge of this requires an open feature window label Aug 8, 2023
@bagder
Copy link
Member

bagder commented Aug 8, 2023

I think we have said we will remove this in September, so it misses the August feature window.

@vszakats
Copy link
Member Author

vszakats commented Aug 8, 2023

__MINGW32__ should cover both old and new mingws, and mingw-w64 definitely keeps defining it. We also use __MINGW64_VERSION_MAJOR when we specifically look for mingw-w64, vs. the old one. Now that we don't have the old one, I think we are safe to fall back to __MINGW32__ for these cases.

Either way, good idea to check these. I'll review them.

@vszakats
Copy link
Member Author

vszakats commented Aug 8, 2023

This KNOWN_BUG might need a re-evaluation: #3125

@vszakats vszakats changed the title mingw: delete support for old/classic/legacy toolchain version mingw: delete support for legacy mingw.org toolchain Aug 9, 2023
@vszakats vszakats force-pushed the del-old-mingw branch 2 times, most recently from 139414a to 5bac934 Compare August 10, 2023 15:27
@jay
Copy link
Member

jay commented Aug 10, 2023

note __MINGW64_VERSION_MAJOR is not a compiler predefine, it is defined by _mingw.h so if we have to evaluate it in the future then we'll need that include

@vszakats
Copy link
Member Author

I'm aware. This patch deletes all uses of __MINGW64_VERSION_MAJOR. We can reinstate _mingw.h once we need to check for a specific mingw-w64 version. This is fairly rarely needed in my experience. We might also leave it there to mark its position and disable it with #if 0, but I'd avoid including headers we don't actually use.

@jay
Copy link
Member

jay commented Aug 11, 2023

I just landed #10056 which has a legacy mingw workaround so when you rebase on master you'll want to remove these lines:
889c071#diff-ee813638cd7ec84110df50039b34c74fab8c79ef2b916858fdb6f19f5121a6abR63-R97

@vszakats vszakats force-pushed the del-old-mingw branch 2 times, most recently from 1b7f309 to b7a50f6 Compare August 11, 2023 19:42
@vszakats
Copy link
Member Author

Thanks @jay, it's done now.

@vszakats
Copy link
Member Author

vszakats commented Aug 15, 2023

I deleted a list of compatibility constants, that were not marked "old mingw"-specific in the source.

Part of them had this information in the commit message of 3d3a3f9. With the rest I took a chance and assumed that if those constants were already defined by mingw-w64 1.0 (2011-09-26), they were also present in the official SDK released with supported MSVC versions (2010 and later).

curl also seems to support Pelles C. I have no idea about what's available there and CI doesn't test it. AFAIR Pelles C used to have fairly decent Windows headers. Tried to download it but even binaries are only offered via cleartext HTTP and even that was a 404. The compiler feels abandoned. We can restore any necessary compatibility macro as we go.

Also, there may be more compatibility macros that were added for old-mingw, but not marked as such.

We might also exclude such updates from this PR if this feels risky.

@vszakats vszakats force-pushed the del-old-mingw branch 2 times, most recently from a00680b to 20940b1 Compare August 21, 2023 21:11
@vszakats vszakats removed the feature-window A merge of this requires an open feature window label Sep 21, 2023
Drop support for "old" / "legacy" / "classic" MinGW or "mingw32":
https://en.wikipedia.org/wiki/MinGW, https://osdn.net/projects/mingw/
Its homepage used to be http://mingw.org/ [no HTTPS], and broken now.
It supported the x86 CPU only and used a old Windows API header and
implib set, often causing issues. It also misses most modern Windows
features, offering old versions of both binutils and gcc (no
llvm/clang support). It was last updated 2 years ago.

curl now relies on toolchains based on the mingw-w64 project:

https://www.mingw-w64.org/  https://sourceforge.net/projects/mingw-w64/
https://www.msys2.org/  https://github.com/msys2/msys2
https://github.com/mstorsjo/llvm-mingw

Also available via Linux and macOS package managers.

Closes curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Sep 30, 2024
vszakats added a commit that referenced this pull request Sep 30, 2024
vszakats added a commit to vszakats/curl that referenced this pull request Jan 14, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 14, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 14, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 14, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 14, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 15, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 16, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 18, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 20, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 21, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Jan 22, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 3, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 5, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 17, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 19, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 20, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
cegcc uses the headers from "old-mingw" and thus suffer from some of the
same limitations. Restore some code deleted when dropping old-mingw.

Adapt the rest to build with wince. Certificate verification always
fails with cegcc due the limitations.

Drop a pre-existing wince #error and let the build finish anyway.

Ref: 3802910 curl#11625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration feature-window A merge of this requires an open feature window tests Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

3 participants