g++spec.c (lang_specific_driver): Put missing hyphen in front of arguments we compare against.

* g++spec.c (lang_specific_driver): Put missing hyphen in front of
        arguments we compare against.  Start the count of I at 1, not 0,
        since argv[0] is still the command.

From-SVN: r13338
This commit is contained in:
Brendan Kehoe 1996-12-20 20:26:35 +00:00 committed by Brendan Kehoe
parent 82c6faa8ba
commit 1bf2b2d2a8
2 changed files with 17 additions and 14 deletions

View File

@ -1,3 +1,9 @@
Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
* g++spec.c (lang_specific_driver): Put missing hyphen in front of
arguments we compare against. Start the count of I at 1, not 0,
since argv[0] is still the command.
Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
* cp-tree.h (ptr_reasonably_similar): Add decl.

View File

@ -76,8 +76,7 @@ lang_specific_driver (fn, in_argc, in_argv)
args = (int *) xmalloc (argc * sizeof (int));
bzero ((char *) args, argc * sizeof (int));
/* NOTE: We start at 0 now, not 1. */
for (i = 0; i < argc; i++)
for (i = 1; i < argc; i++)
{
/* If the previous option took an argument, we swallow it here. */
if (quote)
@ -93,13 +92,13 @@ lang_specific_driver (fn, in_argc, in_argv)
if (argv[i][0] == '-')
{
if (library != 0 && (strcmp (argv[i], "nostdlib") == 0
|| strcmp (argv[i], "nodefaultlibs") == 0))
if (library != 0 && (strcmp (argv[i], "-nostdlib") == 0
|| strcmp (argv[i], "-nodefaultlibs") == 0))
{
library = 0;
}
else if (strcmp (argv[i], "lm") == 0
|| strcmp (argv[i], "lmath") == 0
else if (strcmp (argv[i], "-lm") == 0
|| strcmp (argv[i], "-lmath") == 0
#ifdef ALT_LIBM
|| strcmp (argv[i], ALT_LIBM) == 0
#endif
@ -108,29 +107,27 @@ lang_specific_driver (fn, in_argc, in_argv)
args[i] |= MATHLIB;
need_math = 0;
}
else if (strcmp (argv[i], "lc") == 0)
else if (strcmp (argv[i], "-lc") == 0)
args[i] |= WITHLIBC;
else if (strcmp (argv[i], "v") == 0)
else if (strcmp (argv[i], "-v") == 0)
{
saw_verbose_flag = 1;
/* We now see if this is 1, since we are doing the switches
differently. */
if (argc == 1)
if (argc == 2)
{
/* If they only gave us `-v', don't try to link
in libg++. */
library = 0;
}
}
else if (strncmp (argv[i], "x", 2) == 0)
else if (strncmp (argv[i], "-x", 2) == 0)
saw_speclang = 1;
else if (((argv[i][2] == '\0'
&& (char *)strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
|| strcmp (argv[i], "Tdata") == 0))
|| strcmp (argv[i], "-Tdata") == 0))
quote = argv[i];
else if (library != 0 && ((argv[i][2] == '\0'
&& (char *) strchr ("cSEM", argv[i][1]) != NULL)
|| strcmp (argv[i], "MM") == 0))
|| strcmp (argv[i], "-MM") == 0))
{
/* Don't specify libraries if we won't link, since that would
cause a warning. */