https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107974
Pali Rohár <pali at kernel dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pali at kernel dot org --- Comment #9 from Pali Rohár <pali at kernel dot org> --- To allow "legacy" (non-WinAPI) functions like open() to operate with long paths, it is required to set "longPathAware" property into EXE file. This can be done manually after producing final EXE file via MS tools mt.exe (like Cristian Adam did in comment #3). But the proper way would be to teach GNU linker to do it because it is linker who produces the final EXE file. It is not gcc compiler, nor mingw runtime. But it is quite hard because of complicated nature how new EXE properties are being set: property is at specified XML path of XML manifest; XML manifest is linked to resource node; all nodes are accessible from PE resource root; PE resource is linked to PE resource directory entry which is in the Optional PE header. GNU linker can already merge PE resource nodes at link time. But as new properties are in XML stanzas, it would be needed from linker to do XML merging. In past I have already created bug reports to GNU LD project for PE manifest support and LD option for UTF-8 support (which is also set via PE manifest): https://sourceware.org/bugzilla/show_bug.cgi?id=30381 https://sourceware.org/bugzilla/show_bug.cgi?id=30382