winegcc: Don't import winecrt0 by default when building with -nodefaultlibs.

This commit is contained in:
Alexandre Julliard 2010-07-26 09:57:37 +02:00
parent 4b48480340
commit f195c1eb5a
4 changed files with 10 additions and 15 deletions

View File

@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = kernel32.dll
IMPORTLIB = kernel32
IMPORTS = ntdll
IMPORTS = winecrt0 ntdll
EXTRALIBS = @COREFOUNDATIONLIB@ @LIBPOLL@
EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b800000

View File

@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = krnl386.exe16
IMPORTLIB = kernel
IMPORTS = kernel32 ntdll
IMPORTS = winecrt0 kernel32 ntdll
DELAYIMPORTS = ddraw dsound user32
EXTRAIMPLIBFLAGS = -m16
EXTRADLLFLAGS = -m16 -nodefaultlibs -Wb,--dll-name,kernel

View File

@ -5,6 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ntdll.dll
IMPORTLIB = ntdll
IMPORTS = winecrt0
EXTRALIBS = @IOKITLIB@ @LIBPTHREAD@
EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000

View File

@ -745,14 +745,11 @@ 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)
if (!opts->nodefaultlibs)
{
add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nodefaultlibs)
{
add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll");
}
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)
@ -833,15 +830,12 @@ static void build(struct options* opts)
add_library(opts, lib_dirs, files, "user32");
}
if (!opts->nostartfiles)
if (!opts->nodefaultlibs)
{
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->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");