From 866f52bce1b64965d57a7326b792ee4c3ebde257 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 9 Aug 2005 20:47:18 +0000 Subject: [PATCH] Ignore prelink failures. --- tools/winegcc/utils.c | 4 ++-- tools/winegcc/utils.h | 2 +- tools/winegcc/winegcc.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 09e0a5e127d..93d9b242344 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -279,7 +279,7 @@ file_type get_lib_type(strarray* path, const char* library, char** file) return file_na; } -void spawn(const strarray* prefix, const strarray* args) +void spawn(const strarray* prefix, const strarray* args, int ignore_errors) { int i, status; strarray* arr = strarray_dup(args); @@ -316,7 +316,7 @@ void spawn(const strarray* prefix, const strarray* args) printf("\n"); } - if ((status = spawnvp( _P_WAIT, argv[0], argv))) + if ((status = spawnvp( _P_WAIT, argv[0], argv)) && !ignore_errors) { if (status > 0) error("%s failed.", argv[0]); else perror("winegcc"); diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h index abf25072709..15f3f703f8c 100644 --- a/tools/winegcc/utils.h +++ b/tools/winegcc/utils.h @@ -62,6 +62,6 @@ char* get_basename(const char* file); void create_file(const char* name, int mode, const char* fmt, ...); file_type get_file_type(const char* filename); file_type get_lib_type(strarray* path, const char* library, char** file); -void spawn(const strarray* prefix, const strarray* arr); +void spawn(const strarray* prefix, const strarray* arr, int ignore_errors); extern int verbose; diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 29af934da47..4e758c3246c 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -341,7 +341,7 @@ static void compile(struct options* opts, const char* lang) } #undef SYS_INCLUDE - spawn(opts->prefix, comp_args); + spawn(opts->prefix, comp_args, 0); } static const char* compile_to_object(struct options* opts, const char* file, const char* lang) @@ -576,7 +576,7 @@ static void build(struct options* opts) } } - spawn(opts->prefix, spec_args); + spawn(opts->prefix, spec_args, 0); /* compile the .spec.c file into a .spec.o file */ old_processor = opts->processor; @@ -624,7 +624,7 @@ static void build(struct options* opts) strarray_add(link_args, "-lc"); } - spawn(opts->prefix, link_args); + spawn(opts->prefix, link_args, 0); /* set the base address */ if (opts->image_base) @@ -637,7 +637,7 @@ static void build(struct options* opts) strarray_add(prelink_args, "--reloc-only"); strarray_add(prelink_args, opts->image_base); strarray_add(prelink_args, strmake("%s.so", output_file)); - spawn(opts->prefix, prelink_args); + spawn(opts->prefix, prelink_args, 1); strarray_free(prelink_args); } } @@ -661,7 +661,7 @@ static void forward(int argc, char **argv, struct options* opts) for( j = 1; j < argc; j++ ) strarray_add(args, argv[j]); - spawn(opts->prefix, args); + spawn(opts->prefix, args, 0); } /*