2.36: windres tool broken; needs fix
Thomas Wolff
towo@towo.net
Mon May 10 04:23:00 GMT 2021
Am 03.05.2021 um 08:35 schrieb Thomas Wolff:
> 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.
And it would actually be the solution, as some testing revealed for me:
Spaces in path names or arguments could actually be embedded in 2.35
already, e.g.
windres -c 65001 --preprocessor '"/my bin/gcc" "-E"'
so there was no need for the 2.36 patch at all in the first place.
Thomas
> 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