From Fedora Project Wiki
(Add trackers)
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:


== Current status ==
== Current status ==
[[Category:ChangeReadyForWrangler]]
[[Category:ChangeAcceptedF37]]


[[Category:SelfContainedChange]]
[[Category:SelfContainedChange]]
Line 23: Line 23:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/ODEXJQQBOLFY3BHIVL6FPSZYPQ3QRMJC/ devel thread]
* Tracker bug: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2754 #2754]
* Release notes tracker: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2055254 #2055254]
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/806 #806]


== Detailed Description ==
== Detailed Description ==
Line 35: Line 36:
Fedora MinGW macros will be provided to target UCRT, with ucrt64-* prefix (ex: `ucrt64-meson`)
Fedora MinGW macros will be provided to target UCRT, with ucrt64-* prefix (ex: `ucrt64-meson`)


mingw-*.spec will be progressively adjusted to add the produced ucrt64-* packages.
mingw-* libraries will be progressively adjusted to add the produced ucrt64-* binaries.


Since mingw-*.spec are very repetitive and cumbersome to modify (each mingw32, mingw64, ucrt package has to be defined manually, and this is boring and error-prone), a custom mingw-fedora tool or solution will be proposed. In the meantime, packages can be modified to add manually the new target.
Since mingw-*.spec are very repetitive and cumbersome to modify (each mingw32, mingw64, ucrt package has to be defined manually, and this is tedious and error-prone), a custom MinGW/Fedora tool or solution will be proposed. In the meantime, packages can be modified to add manually the new target.


[https://lists.fedoraproject.org/archives/list/mingw@lists.fedoraproject.org/thread/JCJCOYRVD2J5UIK5TJXHNVDHNEBZWL43/ UCRT plans on  mingw@lists.fedoraproject.org ]
[https://lists.fedoraproject.org/archives/list/mingw@lists.fedoraproject.org/thread/JCJCOYRVD2J5UIK5TJXHNVDHNEBZWL43/ UCRT plans on  mingw@lists.fedoraproject.org ]

Latest revision as of 14:25, 16 February 2022

MinGW UCRT target

Summary

This proposal is to add the UCRT target & support from Fedora to the MinGW cross-toolchains.

Owner


Current status

Detailed Description

The current mingw32 and mingw64 cross-toolchains provided by Fedora target the MSVCRT (Microsoft Visual C++ Runtime). Since Visual Studio 15 & Windows 10, the default and recommended runtime is UCRT. See also MSVCRT vs UCRT.

A new toolchain target triple x86_64-w64-mingw32ucrt and associated binaries will be added.

Fedora MinGW macros will be provided to target UCRT, with ucrt64-* prefix (ex: ucrt64-meson)

mingw-* libraries will be progressively adjusted to add the produced ucrt64-* binaries.

Since mingw-*.spec are very repetitive and cumbersome to modify (each mingw32, mingw64, ucrt package has to be defined manually, and this is tedious and error-prone), a custom MinGW/Fedora tool or solution will be proposed. In the meantime, packages can be modified to add manually the new target.

UCRT plans on mingw@lists.fedoraproject.org

Feedback

Benefit to Fedora

This change will allow to cross-compile projects to Windows with the up to date C runtime & headers, and better c99 support. This should allow to more easily mix binaries produced from different versions or compilers as well.

Scope

  • Proposal owners:
    • update the mingw filesystem, binutils, headers, gcc & winpthreads packages
    • bootstrap the new toolchain
    • propose a solution to simplify library packaging with the different targets
    • update some common library packages, such as mingw-zlib
  • Other developers:
    • Progressively adjust the mingw-* packages to produce ucrt64- packages, following the updated guidelines.
  • Policies and guidelines: N/A (not needed for this Change)

https://fedoraproject.org/wiki/Packaging:MinGW packaging guideline will be adjusted.

  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:


Upgrade/compatibility impact

None

How To Test

$ x86_64-w64-mingw32ucrt-gcc test.c

$ /usr/bin/mingw-objdump -p a.exe | grep DLL
 vma:            Hint    Time      Forward  DLL       First
    DLL Name: KERNEL32.dll
    DLL Name: api-ms-win-crt-time-l1-1-0.dll
    DLL Name: api-ms-win-crt-math-l1-1-0.dll
    DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
    DLL Name: api-ms-win-crt-environment-l1-1-0.dll
    DLL Name: api-ms-win-crt-private-l1-1-0.dll
    DLL Name: api-ms-win-crt-heap-l1-1-0.dll
    DLL Name: api-ms-win-crt-locale-l1-1-0.dll
    DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
    DLL Name: api-ms-win-crt-string-l1-1-0.dll


User Experience

Windows binaries produced by Fedora cross-toolchain will target a more modern and compatible C runtime, bringing hopefully better compatibility & safety.

Dependencies

None

Contingency Plan

  • Contingency mechanism: N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? No (not a System Wide Change)

Documentation

N/A (not a System Wide Change)

Release Notes

The new MinGW toolchain and tools are available to compile binaries targeting the Windows UCRT.