https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90692
Bug ID: 90692 Summary: The "%{!shared:%:if-exists(default-manifest.o%s)}" spec option fails if gcc is installed in a path with spaces Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: Olivier.Michel at cyberbotics dot com Target Milestone: --- Created attachment 46438 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46438&action=edit Proposed patch The "%{!shared:%:if-exists(default-manifest.o%s)}" spec option fails if gcc is installed in a path with spaces. It turns out the problem lies in gcc.c where the spec "%s" function will expand "default-manifest.o" into "D:/msys 64/mingw64/x86_64-w64-mingw32/lib/default-manifest.o" or so which is correct, but because of the if-exists function, it will be tested and further expanded into "D:/msys" and "64/mingw64/x86_64-w64-mingw32/lib/default-manifest.o" (split at the space) which is then passed to collect2 and fails. See report here: https://github.com/msys2/MINGW-packages/issues/4744