From e9de7761cd6c83f296a72a35322a3d1c88ea87b8 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 20 May 2020 17:34:53 +0200 Subject: [PATCH] winegcc: Pass only raw compiler and linker arguments in forward mode. Fixes use case like: CC=winegcc -b i686-w64-mingw32 $CC --version Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- tools/winegcc/winegcc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 143910ae636..b59d9c2c81b 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1462,13 +1462,10 @@ static void build(struct options* opts) static void forward(int argc, char **argv, struct options* opts) { strarray* args = strarray_alloc(); - int j; strarray_addall(args, get_translator(opts)); - - for( j = 1; j < argc; j++ ) - strarray_add(args, argv[j]); - + strarray_addall(args, opts->compiler_args); + strarray_addall(args, opts->linker_args); spawn(opts->prefix, args, 0); strarray_free (args); }