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

  1. 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

Most upvoted comments

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.