[Bug binutils/4356] windres fails on files with spaces

2021-03-28 Thread david.macek.0 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=4356

David Macek  changed:

   What|Removed |Added

 CC||david.macek.0 at gmail dot com

--- Comment #15 from David Macek  ---
It seems the latest patch has broken this unsupported use case that had worked
on Win32:

windres "--preprocessor=gcc -E" --use-temp-file [...]

If I don't enable temp files or don't specify the preprocessor, it works.

See <https://gitlab.haskell.org/ghc/ghc/-/issues/16780#note_340986> for an
example of such usage.  Given GHC corrected its usage to one that seems more
correct, I'd say there's no need for an action here, but at least this note
could help someone having the same issue.

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


[Bug binutils/4356] windres fails on files with spaces

2021-04-02 Thread david.macek.0 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=4356

--- Comment #22 from David Macek  ---
I guess I'm confused as well.

The specific comment I linked said:

> We should probably use --preprocessor-arg instead to pass arguments.

Until we realized that, there were discussions on how to patch windres, but
those don't apply anymore AFAICT.

If there is something to be fixed, it might be the inconsistency between
`--use-temp-file` and `--no-use-temp-file`.  Apparently without a temp file,
windres still interprets a multiple word `--preprocessor` value as a command
and arguments.  (Assuming this is not actually just a quirk of our windres
build.)

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


[Bug binutils/4356] windres fails on files with spaces

2021-04-04 Thread david.macek.0 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=4356

--- Comment #24 from David Macek  ---
Here you go.  Can you confirm this behavior?

$ cat a.rc
1 VERSIONINFO
FILEVERSION 1,0,0,0
BEGIN
END

$ ls a.res
ls: a.res: No such file or directory

$ windres -o a.res a.rc "--preprocessor=gcc -E -xc"

$ echo %ERRORLEVEL%
0

$ ls a.res
a.res

$ rm a.res

$ windres -o a.res a.rc "--preprocessor=gcc -E -xc" --use-temp-file
windres: CreateProcess (null): No such file or directory

$ ls a.res
ls: a.res: No such file or directory

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


[Bug binutils/4356] windres fails on files with spaces

2021-04-04 Thread david.macek.0 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=4356

--- Comment #26 from David Macek  ---
Sorry for the confusion, I stand corrected.  I assumed the presented
inconsistency, although in an incorrect usage, would translate into an
inconsistency with correct usage.  I tried directing windres to something like
"C:\path with spaces\gcc", but I wasn't able to break it regardless of temp
files.

On the other hand, I was able to break windres by having it itself be in a path
with spaces:

$ mklink /j "W:\mingw64 root" "C:\msys64\mingw64"
Junction created for W:\mingw64 root <<===>> C:\msys64\mingw64

$ set PATH=C:\windows\system32;W:\mingw64 root\bin

$ "W:\mingw64 root\bin\windres.exe" a.rc -o a.res --use-temp-file
W:\mingw64 root\bin\windres.exe: CreateProcess (null): No such file or
directory

$ "W:\mingw64 root\bin\windres.exe" a.rc -o a.res
'W:\mingw64' is not recognized as an internal or external command,
operable program or batch file.
W:\mingw64 root\bin\windres.exe: preprocessing failed.

$ "W:\mingw64 root\bin\windres.exe" a.rc -o a.res "--preprocessor=W:\mingw64
root\bin\gcc" --preprocessor-arg=-E --preprocessor-arg=-xc
(works)

$ "W:\mingw64 root\bin\windres.exe" a.rc -o a.res "--preprocessor=W:\mingw64
root\bin\gcc" --preprocessor-arg=-E --preprocessor-arg=-xc --use-temp-file
(works)

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