winegcc: Explicitly pass DLL crt entry point to PE linker when Wine crt is used.

Linkers don't agree on its default.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-05-04 15:19:43 +02:00 committed by Alexandre Julliard
parent 346cbb6f26
commit 78ce43f017
1 changed files with 3 additions and 0 deletions

View File

@ -1292,6 +1292,9 @@ 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 (is_pe && opts->use_msvcrt && !entry_point && (opts->shared || opts->win16_app))
entry_point = opts->target_cpu == CPU_x86 ? "DllMainCRTStartup@12" : "DllMainCRTStartup";
if (is_pe && entry_point)
strarray_add(link_args, strmake("-Wl,--entry,%s%s",
is_pe && opts->target_cpu == CPU_x86 ? "_" : "",