From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- tools/winegcc/winegcc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 60cc6148158..62a03db53a0 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -178,6 +178,7 @@ struct options int strip; int pic; int no_default_config; + int build_id; const char* wine_objdir; const char* winebuild; const char* output_name; @@ -427,6 +428,9 @@ static struct strarray get_link_args( struct options *opts, const char *output_n if (opts->debug_file && strendswith(opts->debug_file, ".pdb")) strarray_add(&link_args, strmake("-Wl,--pdb=%s", opts->debug_file));
+ if (opts->build_id) + strarray_add( &link_args, "-Wl,--build-id"); + if (opts->out_implib) strarray_add(&link_args, strmake("-Wl,--out-implib,%s", opts->out_implib));
@@ -466,6 +470,9 @@ static struct strarray get_link_args( struct options *opts, const char *output_n else if (!opts->strip) strarray_add(&link_args, "-Wl,-debug:dwarf");
+ if (opts->build_id) + strarray_add( &link_args, "-Wl,-build-id"); + if (opts->out_implib) strarray_add(&link_args, strmake("-Wl,-implib:%s", opts->out_implib)); else @@ -1843,6 +1850,11 @@ int main(int argc, char **argv) opts.out_implib = xstrdup( Wl.str[++j] ); continue; } + if (!strcmp( Wl.str[j], "--build-id" )) + { + opts.build_id = 1; + continue; + } if (!strcmp(Wl.str[j], "-static")) linking = -1; strarray_add(&opts.linker_args, strmake("-Wl,%s",Wl.str[j])); }