Martin Storsjö
b1e19e7ebb
wrappers: Relicense windres-wrapper.c from Unlicense to ISC
...
This is done with permission from Josh de Kock, see
https://github.com/mstorsjo/llvm-mingw/pull/4 for discussion.
2020-03-05 11:31:31 +02:00
Anton Mitrofanov
130bbed695
windres-wrapper: Fix --target=pe-i386
2020-02-09 23:43:40 +02:00
Martin Storsjö
ee894b6f63
windres: Accept the abbreviated form --include in addition to --include-dir
...
As GNU binutils windres uses getopt for option parsing, it accepts
any unique abbreviation of the long options. For now just look
for this particular abbreviation instead of any potential one,
as there's at least one existing use in the wild of --include:
https://github.com/tcltk/tcl/blob/fe69f643609d633facf249c9c963ce121153a8ff/win/tcl.m4#L640
2020-01-05 22:09:31 +02:00
Martin Storsjö
ce7d3ec874
windres-wrapper: Short options joined with the option value doesn't use an equals character
...
This makes options like "-iinput.rc -ooutput.o" work properly.
2019-11-21 08:10:52 +02:00
Martin Storsjö
9f8e5cebd6
windres-wrapper: Implement the -F/--target flag like GNU windres
...
The values passed to this parameter aren't arch/vendor/os triples, but
bfd target names.
2019-10-08 09:24:50 +03:00
Martin Storsjö
750ab50433
wrappers: Consistently quote all arguments when calling spawn or creating a command line
2019-05-06 11:04:53 +03:00
Martin Storsjö
fa88c4ee1e
wrappers: Escape the first argument to spawn
...
This fixes running in paths that contain a space.
2019-05-06 11:04:53 +03:00
Martin Storsjö
97ca0681bc
wrappers: Split out shared helpers for native wrapper executables to a header
2019-05-06 11:04:53 +03:00
Martin Storsjö
66055dfe63
wrappers: Take the argv null terminator into account when checking for overflows
...
When adding the terminator without incrementing arg and checking for
overflows with "arg > max_arg", we need to allocate space for one
extra element for the implicit terminator.
2019-05-06 11:04:27 +03:00
Martin Storsjö
013dfc08e4
windres-wrapper: Check that the number of args isn't exceeded
2019-05-06 11:04:27 +03:00
Martin Storsjö
ae2a98efba
windres: Ignore the --use-temp-file option
...
This option seems to be used occasionally by projects to work around
various issues with popen in GNU windres.
Our windres wrapper always uses a temp file for the preprocessing
output, so for us the option is a no-op.
2018-11-13 00:35:53 +02:00
Martin Storsjö
643d9c1645
windres: Fix handling of -D/-U options with a space between the option and the name of the define
2018-10-19 09:23:30 +03:00
Martin Storsjö
b611bc1904
Convert the windres wrapper from shell script to C
...
This allow running windres on windows without a surrounding posix shell.
2018-10-10 23:33:19 +03:00