Ignore prelink failures.
diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c
index 09e0a5e..93d9b24 100644
--- a/tools/winegcc/utils.c
+++ b/tools/winegcc/utils.c
@@ -279,7 +279,7 @@
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 @@
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 abf2507..15f3f70 100644
--- a/tools/winegcc/utils.h
+++ b/tools/winegcc/utils.h
@@ -62,6 +62,6 @@
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 29af934..4e758c3 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -341,7 +341,7 @@
}
#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 @@
}
}
- 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 @@
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 @@
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 @@
for( j = 1; j < argc; j++ )
strarray_add(args, argv[j]);
- spawn(opts->prefix, args);
+ spawn(opts->prefix, args, 0);
}
/*