Skip to content

Windows: update gcc 9 toolchain and bypass `MAX_PATH`.

This updates the toolchain to GCC 9.2 and updates Binutils to 2.32 and CRT and headers to latest. The updating requires fixing of the order of various headers and other new -Werror issues. In general we should always include rts.h first.

It also provides mechanisms to patch the toolchain to bypass MAX_PATH. The patched toolchain will end up being named phyx instead of any.

How it works can be read https://hub.zhox.com/posts/bypassing-max_path-limit-on-windows/ here The full source of the tool is available here https://github.com/Mistuke/Ghc-jailbreak in case you want to grab a copy.

The patching uses Windows APIs so it requires Windows and pgp to work. Though it would probably work on Wine.

To patch run

mk/get-win32-tarballs.sh fetch mirror
mk/get-win32-tarballs.sh patch
mk/get-win32-tarballs.sh hash > mk/win32-tarballs.md5sum
mk/get-win32-tarballs.sh sync

The MR needs to be updated after the mirroring with the right mk/win32-tarballs.md5sum.

Fixes #16428 (closed) #16107 (closed) #13210 (closed)

Edited by Tamar Christina

Merge request reports