From 7b08604778b61972e2a8d8d80c79d5987dbd0d57 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 17 Jun 2009 16:10:56 +0200 Subject: [PATCH] winegcc: Add support for the -Wl,--large-address-aware option. --- tools/winegcc/winegcc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index e9cd671d7f1..c2fb4f3d491 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -193,6 +193,7 @@ struct options int unicode_app; int compile_only; int force_pointer_size; + int large_address_aware; const char* wine_objdir; const char* output_name; const char* image_base; @@ -704,6 +705,8 @@ static void build(struct options* opts) if (opts->image_base) strarray_add(link_args, strmake("-Wl,--image-base,%s", opts->image_base)); + if (opts->large_address_aware) strarray_add( link_args, "-Wl,--large-address-aware" ); + if (opts->unicode_app && !opts->shared) strarray_add(link_args, mingw_unicode_hack(opts)); @@ -818,6 +821,7 @@ static void build(struct options* opts) strarray_add(spec_args, "--entry"); strarray_add(spec_args, "__wine_spec_exe_wentry"); } + if (opts->large_address_aware) strarray_add( spec_args, "--large-address-aware" ); } for ( j = 0; j < lib_dirs->size; j++ ) @@ -1271,6 +1275,11 @@ int main(int argc, char **argv) opts.section_align = strdup( Wl->base[++j] ); continue; } + if (!strcmp(Wl->base[j], "--large-address-aware")) + { + opts.large_address_aware = 1; + continue; + } if (!strcmp(Wl->base[j], "-static")) linking = -1; strarray_add(opts.linker_args, strmake("-Wl,%s",Wl->base[j])); } -- 2.11.4.GIT