From: Rémi Bernon <rbernon(a)codeweavers.com> --- tools/winegcc/winegcc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 46a63453985..a42cfd7a617 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -598,7 +598,14 @@ static struct strarray get_link_args( const char *output_name ) if (entry_point) strarray_add( &flags, strmake( "-Wl,-entry:%s", entry_point )); - if (subsystem) strarray_add( &flags, strmake( "-Wl,--subsystem:%s", subsystem ) ); + if (subsystem) + { + char *version = strchr( subsystem, ':' ); + if (version) subsystem = strmake( "%.*s,%s", (int)(version - subsystem), subsystem, version + 1 ); + + strarray_add( &flags, "-Xlinker" ); + strarray_add( &flags, strmake( "-subsystem:%s", subsystem ) ); + } STRARRAY_FOR_EACH( file, &output_debug_files ) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9027