re PR bootstrap/38580 (Bootstrap broken on mingw32)
PR bootstrap/38580 * gcc.c (process_command): Replace call to execvp with calls to pex_one and exit. From-SVN: r143330
This commit is contained in:
parent
2e50357552
commit
5d14e3d50a
@ -1,3 +1,9 @@
|
||||
2009-01-13 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
PR bootstrap/38580
|
||||
* gcc.c (process_command): Replace call to execvp with calls
|
||||
to pex_one and exit.
|
||||
|
||||
2009-01-03 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
PR target/29141
|
||||
|
19
gcc/gcc.c
19
gcc/gcc.c
@ -1,6 +1,6 @@
|
||||
/* Compiler driver program that can handle many languages.
|
||||
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
@ -3382,6 +3382,9 @@ process_command (int argc, const char **argv)
|
||||
char **new_argv;
|
||||
char *new_argv0;
|
||||
int baselen;
|
||||
int status = 0;
|
||||
int err = 0;
|
||||
const char *errmsg;
|
||||
|
||||
while (argc > 1 && argv[1][0] == '-'
|
||||
&& (argv[1][1] == 'V'
|
||||
@ -3424,8 +3427,18 @@ process_command (int argc, const char **argv)
|
||||
new_argv = XDUPVEC (char *, argv, argc + 1);
|
||||
new_argv[0] = new_argv0;
|
||||
|
||||
execvp (new_argv0, new_argv);
|
||||
fatal ("couldn't run '%s': %s", new_argv0, xstrerror (errno));
|
||||
errmsg = pex_one (PEX_SEARCH, new_argv0, new_argv, progname, NULL,
|
||||
NULL, &status, &err);
|
||||
|
||||
if (errmsg)
|
||||
{
|
||||
if (err == 0)
|
||||
fatal ("couldn't run '%s': %s", new_argv0, errmsg);
|
||||
else
|
||||
fatal ("couldn't run '%s': %s: %s", new_argv0, errmsg,
|
||||
xstrerror (err));
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Set up the default search paths. If there is no GCC_EXEC_PREFIX,
|
||||
|
Loading…
Reference in New Issue
Block a user