winegcc: Use custom subsystem 'unixlib' instead of 'native' for Unix libraries.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-08-12 11:33:21 +02:00
parent ada8bf034a
commit 7d60d0d7bb
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
MODULE = winepulse.drv
IMPORTS = dxguid uuid winmm user32 advapi32 ole32
EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -Wl,--subsystem,native
EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -Wl,--subsystem,unixlib
EXTRAINCL = $(PULSE_CFLAGS)
EXTRADLLFLAGS = -mno-cygwin

View File

@ -523,7 +523,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name )
if (opts->unicode_app) strarray_add( flags, "-municode" );
if (opts->nodefaultlibs || opts->use_msvcrt) strarray_add( flags, "-nodefaultlibs" );
if (opts->nostartfiles || opts->use_msvcrt) strarray_add( flags, "-nostartfiles" );
if (opts->subsystem) strarray_add( flags, strmake("-Wl,--subsystem,%s", opts->subsystem ));
if (opts->subsystem && strcmp(opts->subsystem, "unixlib")) strarray_add( flags, strmake("-Wl,--subsystem,%s", opts->subsystem ));
strarray_add( flags, "-Wl,--nxcompat" );
@ -563,7 +563,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name )
if (opts->nodefaultlibs || opts->use_msvcrt) strarray_add( flags, "-nodefaultlibs" );
if (opts->nostartfiles || opts->use_msvcrt) strarray_add( flags, "-nostartfiles" );
if (opts->image_base) strarray_add( flags, strmake("-Wl,-base:%s", opts->image_base ));
if (opts->subsystem)
if (opts->subsystem && strcmp(opts->subsystem, "unixlib"))
strarray_add( flags, strmake("-Wl,-subsystem:%s", opts->subsystem ));
else
strarray_add( flags, strmake("-Wl,-subsystem:%s", opts->gui_app ? "windows" : "console" ));
@ -1091,7 +1091,7 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil
strarray_add(files, strmake("-a%s", fullname));
break;
case file_dll:
if (opts->unix_lib && opts->subsystem && !strcmp(opts->subsystem, "native"))
if (opts->unix_lib && opts->subsystem && !strcmp(opts->subsystem, "unixlib"))
{
if (get_lib_type(opts->target_platform, lib_dirs, library, "", ".so", &unixlib) == file_so)
{
@ -1177,7 +1177,7 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
strarray_add(spec_args, entry_point);
}
if (opts->subsystem)
if (opts->subsystem && strcmp( opts->subsystem, "unixlib" ))
{
strarray_add(spec_args, "--subsystem");
strarray_add(spec_args, opts->subsystem);