Alexandre Julliard : winegcc: Import kernel32 and ntdll by default also when building Wine.
Alexandre Julliard
julliard at winehq.org
Wed Jul 21 10:54:59 CDT 2010
Module: wine
Branch: master
Commit: 9f34a57743b864b8ec87a975a4a534130d4096aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f34a57743b864b8ec87a975a4a534130d4096aa
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jul 21 13:03:12 2010 +0200
winegcc: Import kernel32 and ntdll by default also when building Wine.
They are needed to resolve symbols in winecrt0 which is always imported.
---
tools/winegcc/winegcc.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index e754a19..1e02f1a 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -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 */
More information about the wine-cvs
mailing list