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

They are needed to resolve symbols in winecrt0 which is always imported.
This commit is contained in:
Alexandre Julliard 2010-07-21 13:03:12 +02:00
parent f9253bbb45
commit 9f34a57743
1 changed files with 19 additions and 3 deletions

View File

@ -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 */