bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/27594] build processes broken by changed space handling


From: eliz at gnu dot org
Subject: [Bug binutils/27594] build processes broken by changed space handling
Date: Mon, 10 May 2021 14:02:20 +0000

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

Eli Zaretskii <eliz at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eliz at gnu dot org

--- Comment #8 from Eli Zaretskii <eliz at gnu dot org> ---
Reverting that change is IMO a mistake.

The breakage of the build process cited in the original report is due to
incorrect usage: it gives --preprocess a full shell command, instead of just
the executable name (the command-line arguments for the preprocessor should
come via --preprocessor-arg, not via --preprocessor.  So saying that the change
should be reverted because it breaks that build is invalid: the build script
should be fixed to use `windres` correctly.

Let's start from the beginning: if the argument to the --preprocessor option
includes space characters, how is this supposed to work with `windres`? 
Quoting 'like this' will not work when `windres` is invoked from cmd.exe, it
will only work when invoked from MSYS Bash, so it cannot be the solution. 
Quoting with backslashes also doesn't work in cmd.exe.  The suggestion to
pre-quote the preprocessor is also unreliable, because when `windres` is run
from cmd.exe or from the native MinGW Make, the program's startup code unquotes
the argument, so the result will depend on how many "unquoting" levels the
command line is subject to.

The only quoting method that works in both Posix shells and cmd.exe is "like
this".  Which is what the change to `quot` did, and now we are back to square
one.

It is IMO incorrect to break native invocation from cmd.exe so that broken
scripts and "pre-quoting" in Posix shell manner could work.

Please restore the original change in `quot`.  If that causes some trouble not
covered by my comments above, please describe them, and please let's try to
find a solution that doesn't break quoting from cmd.exe again.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]