diff options
author | Peter O'Gorman <peter@pogma.com> | 2005-08-07 02:39:12 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2005-08-06 19:39:12 -0700 |
commit | 3300bf07379ac6aaa8367313eae8234f273c4ea8 (patch) | |
tree | 0f8a13dcac8da97a70836a45d7a5b75832fe3342 /gcc/gcc.c | |
parent | e2ba06d66dfa00f390cb4d8199352853db7ba1bd (diff) | |
download | gcc-3300bf07379ac6aaa8367313eae8234f273c4ea8.zip gcc-3300bf07379ac6aaa8367313eae8234f273c4ea8.tar.gz gcc-3300bf07379ac6aaa8367313eae8234f273c4ea8.tar.bz2 |
Make Darwin -bundle option work. Patch from Peter O'Gorman.
PR 21366
* gcc.c (process_command): Check the argument to -b has a dash.
* doc/invoke.texi: Update -b and -V docs.
From-SVN: r102829
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -3175,9 +3175,12 @@ 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. */ + 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][1] == 'V' || + ((argv[1][1] == 'b') && (NULL != strchr(argv[1] + 2,'-'))))) { const char *new_version = DEFAULT_TARGET_VERSION; const char *new_machine = DEFAULT_TARGET_MACHINE; @@ -3187,7 +3190,8 @@ process_command (int argc, const char **argv) int baselen; while (argc > 1 && argv[1][0] == '-' - && (argv[1][1] == 'V' || argv[1][1] == 'b')) + && (argv[1][1] == 'V' || + ((argv[1][1] == 'b') && ( NULL != strchr(argv[1] + 2,'-'))))) { char opt = argv[1][1]; const char *arg; @@ -3608,6 +3612,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" switch (c) { case 'b': + if (NULL == strchr(argv[i] + 2, '-')) break; case 'V': fatal ("'-%c' must come at the start of the command line", c); break; |