winegcc: No longer use a constructor for module initialization.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-04-21 11:27:53 +02:00
parent 7193243431
commit 1ccd638b1a
1 changed files with 2 additions and 4 deletions

View File

@ -534,8 +534,6 @@ static strarray *get_link_args( struct options *opts, const char *output_name )
strarray_add( flags, "-Wl,--no-wchar-size-warning" ); strarray_add( flags, "-Wl,--no-wchar-size-warning" );
if (!try_link( opts->prefix, link_args, "-Wl,-z,defs" )) if (!try_link( opts->prefix, link_args, "-Wl,-z,defs" ))
strarray_add( flags, "-Wl,-z,defs" ); strarray_add( flags, "-Wl,-z,defs" );
if (opts->shared && !try_link( opts->prefix, link_args, "-Wl,-init,__wine_spec_init" ))
strarray_add( flags, "-Wl,-init,__wine_spec_init" );
strarray_addall( link_args, flags ); strarray_addall( link_args, flags );
return link_args; return link_args;
@ -1379,8 +1377,8 @@ static void build(struct options* opts)
} }
} }
if (!is_pe && !opts->shared) fixup_constructors( opts, output_path ); if (!is_pe) fixup_constructors( opts, output_path );
if (is_pe && opts->wine_builtin) make_wine_builtin( opts, output_path ); else if (opts->wine_builtin) make_wine_builtin( opts, output_path );
/* create the loader script */ /* create the loader script */
if (generate_app_loader) if (generate_app_loader)