MSYS2-packages: binutils: `windres` no longer accepts `gcc -E ...` as `--preprocessor` argument
Describe the issue
It seems that windres accepted --preprocessor 'gcc -E -xc -DRC_INVOKED -MMD -MP -DTARGET=x86_64-pc-msys -DNDEBUG', but it no longer does: https://dev.azure.com/Git-for-Windows/git/_build/results?buildId=72588&view=logs&j=37cf11af-77b8-5c27-8799-06c003698f4e&t=1bd7294c-f7d3-59f4-5adf-18c9754f1b0e&l=171
Steps to Reproduce the Problem
- Run this:
$ >example.rc $ windres --preprocessor 'gcc -E -xc -DRC_INVOKED -MMD -MP -DTARGET=x86_64-pc-msys -DNDEBUG' example.rc example.o /bin/sh: gcc -E -xc -DRC_INVOKED -MMD -MP -DTARGET=x86_64-pc-msys -DNDEBUG: command not found windres: preprocessing failed.
Additional Context: Operating System, Screenshots
This happened while I tried to build MinTTY v3.4.7, which used that windres invocation for ages, but it now fails. So it must have been caused by one of the recent updates to binutils.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (7 by maintainers)
Commits related to this issue
- mintty: work around a recent `windres` regression It would appear that it no longer accepts `--preprocessor 'gcc -E ...'` as command-line parameter. See also https://github.com/msys2/MSYS2-packages/... — committed to git-for-windows/MSYS2-packages by dscho 3 years ago
- Allow spaces in the name of the external preprocessor used by windres. PR 26865 * windres.c (main): If the preprocessor name includes spaces, ensure that it is quoted. — committed to bminor/binutils-gdb by nickclifton 4 years ago
Revert here: #2384 but I haven’t tested it
The mintty 3.5.1 Makefile now has a workaround, so the MSYS2 patch can be removed.