Commit f195c1eb authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 4b484803
...@@ -5,7 +5,7 @@ SRCDIR = @srcdir@ ...@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = kernel32.dll MODULE = kernel32.dll
IMPORTLIB = kernel32 IMPORTLIB = kernel32
IMPORTS = ntdll IMPORTS = winecrt0 ntdll
EXTRALIBS = @COREFOUNDATIONLIB@ @LIBPOLL@ EXTRALIBS = @COREFOUNDATIONLIB@ @LIBPOLL@
EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b800000 EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b800000
......
...@@ -4,7 +4,7 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = krnl386.exe16 MODULE = krnl386.exe16
IMPORTLIB = kernel IMPORTLIB = kernel
IMPORTS = kernel32 ntdll IMPORTS = winecrt0 kernel32 ntdll
DELAYIMPORTS = ddraw dsound user32 DELAYIMPORTS = ddraw dsound user32
EXTRAIMPLIBFLAGS = -m16 EXTRAIMPLIBFLAGS = -m16
EXTRADLLFLAGS = -m16 -nodefaultlibs -Wb,--dll-name,kernel EXTRADLLFLAGS = -m16 -nodefaultlibs -Wb,--dll-name,kernel
......
...@@ -5,6 +5,7 @@ SRCDIR = @srcdir@ ...@@ -5,6 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = ntdll.dll MODULE = ntdll.dll
IMPORTLIB = ntdll IMPORTLIB = ntdll
IMPORTS = winecrt0
EXTRALIBS = @IOKITLIB@ @LIBPTHREAD@ EXTRALIBS = @IOKITLIB@ @LIBPTHREAD@
EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000 EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000
......
...@@ -745,15 +745,12 @@ static void build(struct options* opts) ...@@ -745,15 +745,12 @@ static void build(struct options* opts)
for ( j = 0; j < lib_dirs->size; j++ ) for ( j = 0; j < lib_dirs->size; j++ )
strarray_add(link_args, strmake("-L%s", lib_dirs->base[j])); strarray_add(link_args, strmake("-L%s", lib_dirs->base[j]));
if (!opts->nostartfiles)
{
add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nodefaultlibs) if (!opts->nodefaultlibs)
{ {
add_library(opts, lib_dirs, files, "winecrt0");
add_library(opts, lib_dirs, files, "kernel32"); add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll"); add_library(opts, lib_dirs, files, "ntdll");
} }
}
if (opts->shared && !opts->nostdlib) add_library(opts, lib_dirs, files, "wine"); if (opts->shared && !opts->nostdlib) add_library(opts, lib_dirs, files, "wine");
if (!opts->shared && opts->use_msvcrt && opts->target_platform == PLATFORM_CYGWIN) if (!opts->shared && opts->use_msvcrt && opts->target_platform == PLATFORM_CYGWIN)
add_library(opts, lib_dirs, files, "msvcrt"); add_library(opts, lib_dirs, files, "msvcrt");
...@@ -833,16 +830,13 @@ static void build(struct options* opts) ...@@ -833,16 +830,13 @@ static void build(struct options* opts)
add_library(opts, lib_dirs, files, "user32"); add_library(opts, lib_dirs, files, "user32");
} }
if (!opts->nostartfiles)
{
add_library(opts, lib_dirs, files, "winecrt0");
if (!opts->nodefaultlibs) if (!opts->nodefaultlibs)
{ {
add_library(opts, lib_dirs, files, "winecrt0");
if (opts->win16_app) add_library(opts, lib_dirs, files, "kernel"); if (opts->win16_app) add_library(opts, lib_dirs, files, "kernel");
add_library(opts, lib_dirs, files, "kernel32"); add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll"); add_library(opts, lib_dirs, files, "ntdll");
} }
}
if (!opts->nostdlib) add_library(opts, lib_dirs, files, "wine"); if (!opts->nostdlib) add_library(opts, lib_dirs, files, "wine");
/* run winebuild to generate the .spec.o file */ /* 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