Commit c30d30d3 authored by Alexandre Julliard's avatar Alexandre Julliard

winegcc: Fixup constructors after building a module.

parent 6c4046fe
......@@ -936,6 +936,16 @@ static strarray *get_winebuild_args(struct options *opts)
return spec_args;
}
static void fixup_constructors( struct options *opts, const char *file )
{
strarray *args = get_winebuild_args( opts );
strarray_add( args, "--fixup-ctors" );
strarray_add( args, file );
spawn( opts->prefix, args, 0 );
strarray_free( args );
}
static void make_wine_builtin( struct options *opts, const char *file )
{
strarray *args = get_winebuild_args( opts );
......@@ -1354,8 +1364,6 @@ static void build(struct options* opts)
spawn(opts->prefix, link_args, 0);
strarray_free (link_args);
if (is_pe && opts->wine_builtin) make_wine_builtin( opts, output_path );
/* set the base address with prelink if linker support is not present */
if (opts->prelink && !opts->target)
{
......@@ -1371,6 +1379,9 @@ static void build(struct options* opts)
}
}
if (!is_pe && !opts->shared) fixup_constructors( opts, output_path );
if (is_pe && opts->wine_builtin) make_wine_builtin( opts, output_path );
/* create the loader script */
if (generate_app_loader)
create_file(output_file, 0755, app_loader_template, strmake("%s.so", output_name));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment