2.36: windres tool broken; needs fix

Thomas Wolff towo@towo.net
Mon May 3 06:35:14 GMT 2021


Hi Nick,
I had responded in the bugzilla issue only, sorry.

Am 29.04.2021 um 14:18 schrieb Nick Clifton:
> Hi Thomas,
>
>> the windres tool as changed in 2.36 breaks build processes, see 
>> https://sourceware.org/bugzilla/show_bug.cgi?id=27594 
>> <https://sourceware.org/bugzilla/show_bug.cgi?id=27594>.
>> As the bug has not yet been assigned or commented, I'd like to make 
>> sure this gets fixed for the next release please.
>
> I am having a hard time understanding what, if anything, needs to be 
> changed for this PR.
Reverting to the binutils 2.35 version would be a good start to fix the 
regression.
The patch proposed in the issue does not fix it.
>
> I did check in a small patch to correct the description of the 
> --preprocessor
> option.  It should now make sense, and show that 'gcc' is the 
> preprocessor and
> -E, -xc-header and -DRC_INVOKED are preprocessor arguments.
Martin's response describes what that would mean. Simply establishing a 
regression bug.
>
> Do you have an example of a failing windres invocation that properly uses
> --preprocessor and --preprocessor-arg along with escaping relevant to the
> shell that is going to interpret the command line ?
Just --preprocessor, no escaping needed (until 2.35):
     windres -c 65001 --preprocessor '$(CC) -E -xc -DRC_INVOKED 
$(DEPOPT) $(CPPFLAGS)' $< $(BINDIR)/$*.o
Assuming someone had an executable with spaces in the filename (as 
discussed in the issue), it might change to:
     windres -c 65001 --preprocessor '"$(CC)" -E -xc -DRC_INVOKED 
$(DEPOPT) $(CPPFLAGS)' $< $(BINDIR)/$*.o

Cheers
Thomas
>
> Cheers
>  Nick
>



More information about the Binutils mailing list