Skip to content

Consider picking up this windres binutils patch regarding quoting from MSYS2 #296

Description

@Aerocatia

binutils provided by MSYS2 has a patch to revert a commit that imo should not have been done upstream.

Unpatched windres will fail if include directories set in CMake (or anything) include a space in it, because the path escape will be stripped by windres before it calls cc1.exe.

So you end up with this for example when running in CMD:

windres -I "some thing" -i in.rc -o out.obj
cc1.exe: fatal error: thing: No such file or directory

Yes having spaces in include paths is bad, but I did not write the code in question that way.

The patch is here.
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-binutils/2003-Revert-Restore-old-behaviour-of-windres-so-that-opti.patch

Also see:
https://sourceware.org/bugzilla/show_bug.cgi?id=4356
https://sourceware.org/bugzilla/show_bug.cgi?id=27594

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions