From: Manuel López-Ibáñez Date: Thu, 8 Apr 2010 17:21:26 +0000 (+0000) Subject: re PR driver/42485 (-V switch broken) X-Git-Tag: releases/gcc-4.6.0~8001 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1401cf37c0f4bd9e35d9a3abc1e4e69ee0c0ebeb;p=thirdparty%2Fgcc.git re PR driver/42485 (-V switch broken) 2010-04-08 Manuel López-Ibáñez 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ecf1f2697ea6..4b7d1e2cc722 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-04-08 Manuel López-Ibáñez + + 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. + 2010-04-08 Christian Borntraeger Wolfgang Gellerich diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 67a1b60d15ca..7a8ca5582cdf 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -428,11 +428,6 @@ Objective-C and Objective-C++ Dialects}. @gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir} -specs=@var{file} -I- --sysroot=@var{dir}} -@item Target Options -@c I wrote this xref this way to avoid overfull hbox. -- rms -@xref{Target Options}. -@gccoptlist{-V @var{version} -b @var{machine}} - @item Machine Dependent Options @xref{Submodel Options,,Hardware Models and Configurations}. @c This list is ordered alphanumerically by subsection name. @@ -9556,33 +9551,7 @@ proper position among the other output files. The usual way to run GCC is to run the executable called @file{gcc}, or @file{-gcc} when cross-compiling, or @file{-gcc-} to run a version other than the one that -was installed last. Sometimes this is inconvenient, so GCC provides -options that will switch to another cross-compiler or version. - -@table @gcctabopt -@item -b @var{machine} -@opindex b -The argument @var{machine} specifies the target machine for compilation. - -The value to use for @var{machine} is the same as was specified as the -machine type when configuring GCC as a cross-compiler. For -example, if a cross-compiler was configured with @samp{configure -arm-elf}, meaning to compile for an arm processor with elf binaries, -then you would specify @option{-b arm-elf} to run that cross compiler. -Because there are other options beginning with @option{-b}, the -configuration must contain a hyphen, or @option{-b} alone should be one -argument followed by the configuration in the next argument. - -@item -V @var{version} -@opindex V -The argument @var{version} specifies which version of GCC to run. -This is useful when multiple versions are installed. For example, -@var{version} might be @samp{4.0}, meaning to run GCC version 4.0. -@end table - -The @option{-V} and @option{-b} options work by running the -@file{-gcc-} executable, so there's no real reason to -use them if you can just run that directly. +was installed last. @node Submodel Options @section Hardware Models and Configurations @@ -9591,11 +9560,7 @@ use them if you can just run that directly. @cindex hardware models and configurations, specifying @cindex machine dependent options -Earlier we discussed the standard option @option{-b} which chooses among -different installed compilers for completely different target -machines, such as VAX vs.@: 68000 vs.@: 80386. - -In addition, each of these target machine types can have its own +Each target machine types can have its own special options, starting with @samp{-m}, to choose among various hardware models or configurations---for example, 68010 vs 68020, floating coprocessor or none. A single installed version of the diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 222117d8207b..8337e161fe42 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -465,7 +465,7 @@ indicates an absolute file name. @defmac MD_EXEC_PREFIX If defined, this macro is an additional prefix to try after @code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched -when the @option{-b} option is used, or the compiler is built as a cross +when the compiler is built as a cross compiler. If you define @code{MD_EXEC_PREFIX}, then be sure to add it to the list of directories used to find the assembler in @file{configure.in}. @end defmac @@ -497,14 +497,13 @@ is built as a cross compiler. @defmac MD_STARTFILE_PREFIX If defined, this macro supplies an additional prefix to try after the standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the -@option{-b} option is used, or when the compiler is built as a cross -compiler. +compiler is built as a cross compiler. @end defmac @defmac MD_STARTFILE_PREFIX_1 If defined, this macro supplies yet another prefix to try after the -standard prefixes. It is not searched when the @option{-b} option is -used, or when the compiler is built as a cross compiler. +standard prefixes. It is not searched when the compiler is built as a +cross compiler. @end defmac @defmac INIT_ENVIRONMENT diff --git a/gcc/gcc.c b/gcc/gcc.c index 9ca245170c2a..cee4bf7767be 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= Use as the root directory for headers\n\ and libraries\n"), stdout); fputs (_(" -B Add to the compiler's search paths\n"), stdout); - fputs (_(" -b Run gcc for target , if installed\n"), stdout); - fputs (_(" -V Run gcc version number , 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; diff --git a/gcc/gcc.h b/gcc/gcc.h index e62b11eafc5c..3f80346dbc59 100644 --- a/gcc/gcc.h +++ b/gcc/gcc.h @@ -38,7 +38,7 @@ struct spec_function || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ || (CHAR) == 'I' || (CHAR) == 'J' || (CHAR) == 'm' \ || (CHAR) == 'x' || (CHAR) == 'L' || (CHAR) == 'A' \ - || (CHAR) == 'V' || (CHAR) == 'B' || (CHAR) == 'b') + || (CHAR) == 'B' ) /* This defines which multi-letter switches take arguments. */