gas/testsuite/
[deliverable/binutils-gdb.git] / gas / as.c
index 7b95369eb4e00119d760b9b4aaddec20223b28c7..d16ad886aed5ee39ec1749fcba4c3d6213e26939 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,6 +1,6 @@
 /* as.c - GAS main program.
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002
+   1999, 2000, 2001, 2002, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -385,7 +385,7 @@ parse_args (int * pargc, char *** pargv)
     /* -K is not meaningful if .word is not being hacked.  */
     'K',
 #endif
-    'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'g', 'I', ':', 'o', ':',
+    'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'g', ':',':', 'I', ':', 'o', ':',
 #ifndef VMS
     /* -v takes an argument on VMS, so we don't make it a generic
        option.  */
@@ -437,6 +437,11 @@ parse_args (int * pargc, char *** pargv)
        the end of the preceeding line so that it is simpler to
        selectively add and remove lines from this list.  */
     {"alternate", no_argument, NULL, OPTION_ALTERNATE}
+    /* The entry for "a" is here to prevent getopt_long_only() from
+       considering that -a is an abbreviation for --alternate.  This is
+       necessary because -a=<FILE> is a valid switch but getopt would
+       normally reject it since --alternate does not take an argument.  */
+    ,{"a", optional_argument, NULL, 'a'}
     ,{"defsym", required_argument, NULL, OPTION_DEFSYM}
     ,{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG}
     ,{"emulation", required_argument, NULL, OPTION_EMULATION}
@@ -584,7 +589,7 @@ parse_args (int * pargc, char *** pargv)
 #else
          printf (_("GNU assembler %s\n"), VERSION);
 #endif
-         printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+         printf (_("Copyright 2005 Free Software Foundation, Inc.\n"));
          printf (_("\
 This program is free software; you may redistribute it under the terms of\n\
 the GNU General Public License.  This program has absolutely no warranty.\n"));
@@ -671,11 +676,10 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
          break;
 
        case 'g':
-         /* Some backends, eg Alpha, use the -g switch for their own
-            purposes.  So we check here for an explicit -g and allow
+         /* Some backends, eg Alpha and Mips, use the -g switch for their
+            own purposes.  So we check here for an explicit -g and allow
             the backend to decide if it wants to process it.  */
          if (   old_argv[optind - 1][1] == 'g'
-             && old_argv[optind - 1][2] == 0
              && md_parse_option (optc, optarg))
            continue;
 
@@ -787,6 +791,9 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
        case 'a':
          if (optarg)
            {
+             if (optarg != old_argv[optind] && optarg[-1] == '=')
+               --optarg;
+
              if (md_parse_option (optc, optarg) != 0)
                break;
 
This page took 0.023972 seconds and 4 git commands to generate.