Alexandre Julliard : winegcc: Don' t import winecrt0 by default when building with -nodefaultlibs.
Alexandre Julliard
julliard at winehq.org
Mon Jul 26 13:22:29 CDT 2010
Module: wine
Branch: master
Commit: f195c1eb5a151ceaf8163d56b01a8230b3a5bdd7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f195c1eb5a151ceaf8163d56b01a8230b3a5bdd7
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jul 26 09:57:37 2010 +0200
winegcc: Don't import winecrt0 by default when building with -nodefaultlibs.
---
dlls/kernel32/Makefile.in | 2 +-
dlls/krnl386.exe16/Makefile.in | 2 +-
dlls/ntdll/Makefile.in | 1 +
tools/winegcc/winegcc.c | 20 +++++++-------------
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in
index 1056174..c55c910 100644
--- a/dlls/kernel32/Makefile.in
+++ b/dlls/kernel32/Makefile.in
@@ -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
diff --git a/dlls/krnl386.exe16/Makefile.in b/dlls/krnl386.exe16/Makefile.in
index 0798e54..893232e 100644
--- a/dlls/krnl386.exe16/Makefile.in
+++ b/dlls/krnl386.exe16/Makefile.in
@@ -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
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index 885036e..8c14708 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -5,6 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ntdll.dll
IMPORTLIB = ntdll
+IMPORTS = winecrt0
EXTRALIBS = @IOKITLIB@ @LIBPTHREAD@
EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 1e02f1a..51bbead 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -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");
More information about the wine-cvs
mailing list