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

Upgrade MinGW Toolchain #830

Closed
stephanosio opened this issue Oct 23, 2024 · 1 comment
Closed

Upgrade MinGW Toolchain #830

stephanosio opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
enhancement platform: Windows Issues related to Zephyr SDK on Windows hosts
Milestone

Comments

@stephanosio
Copy link
Member

stephanosio commented Oct 23, 2024

The MinGW toolchain that is available as part of Debian 10, which is the base image for the sdk-build Docker image, is too outdated (MinGW 6.0.0 with GCC 8.3.0) to support Windows LLVM build.

Update the sdk-build Docker image to include a more up-to-date MinGW-w64 toolchain.

Notes

  • It will be necessary to build the full MinGW-w64 toolchain from source since there is no adequate binary distribution available for Debian 10.
  • Use mingw-w64 package from Ubuntu 24.10 as a reference.
  • GCC will need to be built for both win32 and posix thread models.
    • Keep building Windows GNU toolchain with win32 thread model since we do not need pthread and we do not want to include pthread DLL in the Windows GNU toolchain distribution.
    • LLVM uses std::thread, which depends on pthread, and therefore require the posix thread model. Yes, we will need to include the pthread DLL.
  • Build MinGW-w64 with UCRT as the "default MSVCRT."

Resources

@stephanosio stephanosio added enhancement platform: Windows Issues related to Zephyr SDK on Windows hosts labels Oct 23, 2024
@stephanosio stephanosio self-assigned this Oct 23, 2024
@stephanosio stephanosio added this to the 0.18.0 milestone Oct 24, 2024
@stephanosio
Copy link
Member Author

zephyrproject-rtos/docker-sdk-build#26 added more up-to-date MinGW-w64 toolchain to the sdk-build Docker image.

The included version is as follows:

  • MinGW 12.0.0
  • Binutils 2.42
  • GCC 13.2.0

There are two variants of MinGW-w64 toolchain installed, each toolchain under their own prefix:

  • /opt/mingw-w64-win32: win32 thread model, for use in Windows GNU toolchain build process
  • /opt/mingw-w64-posix :posix thread model, for use in Windows LLVM toolchain build process

Both variants of MinGW-w64 toolchain default to UCRT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement platform: Windows Issues related to Zephyr SDK on Windows hosts
Projects
None yet
Development

No branches or pull requests

1 participant