Commit 1bf2b2d2 by Brendan Kehoe Committed by Brendan Kehoe

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