Commit 5d14e3d5 by Danny Smith Committed by Danny Smith

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
parent 2e503575
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> 2009-01-03 Anatoly Sokolov <aesok@post.ru>
PR target/29141 PR target/29141
......
/* Compiler driver program that can handle many languages. /* Compiler driver program that can handle many languages.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 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. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -3382,6 +3382,9 @@ process_command (int argc, const char **argv) ...@@ -3382,6 +3382,9 @@ process_command (int argc, const char **argv)
char **new_argv; char **new_argv;
char *new_argv0; char *new_argv0;
int baselen; int baselen;
int status = 0;
int err = 0;
const char *errmsg;
while (argc > 1 && argv[1][0] == '-' while (argc > 1 && argv[1][0] == '-'
&& (argv[1][1] == 'V' && (argv[1][1] == 'V'
...@@ -3424,8 +3427,18 @@ process_command (int argc, const char **argv) ...@@ -3424,8 +3427,18 @@ process_command (int argc, const char **argv)
new_argv = XDUPVEC (char *, argv, argc + 1); new_argv = XDUPVEC (char *, argv, argc + 1);
new_argv[0] = new_argv0; new_argv[0] = new_argv0;
execvp (new_argv0, new_argv); errmsg = pex_one (PEX_SEARCH, new_argv0, new_argv, progname, NULL,
fatal ("couldn't run '%s': %s", new_argv0, xstrerror (errno)); 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, /* Set up the default search paths. If there is no GCC_EXEC_PREFIX,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment