Commit 9f34a577 authored by Alexandre Julliard's avatar Alexandre Julliard

winegcc: Import kernel32 and ntdll by default also when building Wine.

They are needed to resolve symbols in winecrt0 which is always imported.
parent f9253bbb
......@@ -745,7 +745,15 @@ static void build(struct options* opts)
for ( j = 0; j < lib_dirs->size; j++ )
strarray_add(link_args, strmake("-L%s", lib_dirs->base[j]));
if (!opts->nostartfiles) add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nostartfiles)
{
add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nodefaultlibs)
{
add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll");
}
}
if (opts->shared && !opts->nostdlib) add_library(opts, lib_dirs, files, "wine");
if (!opts->shared && opts->use_msvcrt && opts->target_platform == PLATFORM_CYGWIN)
add_library(opts, lib_dirs, files, "msvcrt");
......@@ -823,10 +831,18 @@ static void build(struct options* opts)
}
add_library(opts, lib_dirs, files, "advapi32");
add_library(opts, lib_dirs, files, "user32");
add_library(opts, lib_dirs, files, "kernel32");
}
if (!opts->nostartfiles) add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nostartfiles)
{
add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nodefaultlibs)
{
if (opts->win16_app) add_library(opts, lib_dirs, files, "kernel");
add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll");
}
}
if (!opts->nostdlib) add_library(opts, lib_dirs, files, "wine");
/* run winebuild to generate the .spec.o file */
......
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