aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2010-04-08 17:21:26 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2010-04-08 17:21:26 +0000
commit1401cf37c0f4bd9e35d9a3abc1e4e69ee0c0ebeb (patch)
tree433be0dd043095ee2230d5a9c8a65c2293a07451 /gcc/gcc.c
parent40ac4f73faa256e049279c1611d47a685ff7f370 (diff)
downloadgcc-1401cf37c0f4bd9e35d9a3abc1e4e69ee0c0ebeb.zip
gcc-1401cf37c0f4bd9e35d9a3abc1e4e69ee0c0ebeb.tar.gz
gcc-1401cf37c0f4bd9e35d9a3abc1e4e69ee0c0ebeb.tar.bz2
re PR driver/42485 (-V switch broken)
2010-04-08 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 42485 * doc/invoke.texi (-b,-V): Delete. * doc/tm.texi: Do not mention -b. * gcc.c (display_help): Delete -b and -V. (process_command): Delete -b and -V. * gcc.h (DEFAULT_SWITCH_TAKES_ARG): Delete -b and -V. From-SVN: r158134
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c90
1 files changed, 2 insertions, 88 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9ca2451..cee4bf7 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -262,11 +262,11 @@ static int use_pipes;
static const char *compiler_version;
-/* The target version specified with -V */
+/* The target version. */
static const char *const spec_version = DEFAULT_TARGET_VERSION;
-/* The target machine specified with -b. */
+/* The target machine. */
static const char *spec_machine = DEFAULT_TARGET_MACHINE;
@@ -3420,8 +3420,6 @@ display_help (void)
--sysroot=<directory> Use <directory> as the root directory for headers\n\
and libraries\n"), stdout);
fputs (_(" -B <directory> Add <directory> to the compiler's search paths\n"), stdout);
- fputs (_(" -b <machine> Run gcc for target <machine>, if installed\n"), stdout);
- fputs (_(" -V <version> Run gcc version number <version>, if installed\n"), stdout);
fputs (_(" -v Display the programs invoked by the compiler\n"), stdout);
fputs (_(" -### Like -v but options quoted and commands not executed\n"), stdout);
fputs (_(" -E Preprocess only; do not compile, assemble or link\n"), stdout);
@@ -3526,81 +3524,6 @@ process_command (int argc, const char **argv)
}
}
- /* If there is a -V or -b option (or both), process it now, before
- trying to interpret the rest of the command line.
- Use heuristic that all configuration names must have at least
- one dash '-'. This allows us to pass options starting with -b. */
- if (argc > 1 && argv[1][0] == '-'
- && (argv[1][1] == 'V'
- || (argv[1][1] == 'b'
- && (argv[1][2] == '\0'
- || NULL != strchr (argv[1] + 2, '-')))))
- {
- const char *new_version = DEFAULT_TARGET_VERSION;
- const char *new_machine = DEFAULT_TARGET_MACHINE;
- const char *progname = argv[0];
- 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'
- || (argv[1][1] == 'b'
- && (argv[1][2] == '\0'
- || NULL != strchr (argv[1] + 2, '-')))))
- {
- char opt = argv[1][1];
- const char *arg;
- if (argv[1][2] != '\0')
- {
- arg = argv[1] + 2;
- argc -= 1;
- argv += 1;
- }
- else if (argc > 2)
- {
- arg = argv[2];
- argc -= 2;
- argv += 2;
- }
- else
- fatal ("'-%c' option must have argument", opt);
- if (opt == 'V')
- new_version = arg;
- else
- new_machine = arg;
- }
-
- for (baselen = strlen (progname); baselen > 0; baselen--)
- if (IS_DIR_SEPARATOR (progname[baselen-1]))
- break;
- new_argv0 = XDUPVAR (char, progname, baselen,
- baselen + concat_length (new_version, new_machine,
- "-gcc-", NULL) + 1);
- strcpy (new_argv0 + baselen, new_machine);
- strcat (new_argv0, "-gcc-");
- strcat (new_argv0, new_version);
-
- new_argv = XDUPVEC (char *, argv, argc + 1);
- new_argv[0] = new_argv0;
-
- 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);
- }
-
/* Convert new-style -- options to old-style. */
translate_options (&argc,
CONST_CAST2 (const char *const **, const char ***,
@@ -4094,15 +4017,6 @@ process_command (int argc, const char **argv)
switch (c)
{
- case 'b':
- if (p[1] && NULL == strchr (argv[i] + 2, '-'))
- goto normal_switch;
-
- /* Fall through. */
- case 'V':
- fatal ("'-%c' must come at the start of the command line", c);
- break;
-
case 'B':
{
const char *value;