2000-11-06 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / gas / as.c
index 2f78cad486addaa08695eb4ab35d1b7d68f8c1ff..db183a3df4fbd7cb2ecfded8853f1747089827db 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -91,8 +91,7 @@ int debug_memory = 0;
 /* We build a list of defsyms as we read the options, and then define
    them after we have initialized everything.  */
 
-struct defsym_list
-{
+struct defsym_list {
   struct defsym_list *next;
   char *name;
   valueT value;
@@ -102,8 +101,7 @@ static struct defsym_list *defsyms;
 
 /* Keep a record of the itbl files we read in.  */
 
-struct itbl_file_list
-{
+struct itbl_file_list {
   struct itbl_file_list *next;
   char *name;
 };
@@ -266,6 +264,8 @@ Options:\n\
   fprintf (stream, _("\
   --help                  show this message and exit\n"));
   fprintf (stream, _("\
+  --target-help           show target specific options\n"));
+  fprintf (stream, _("\
   -I DIR                  add DIR to search list for .include directives\n"));
   fprintf (stream, _("\
   -J                      don't warn about signed overflow\n"));
@@ -350,24 +350,23 @@ parse_args (pargc, pargv)
 
   char *shortopts;
   extern CONST char *md_shortopts;
-  static const char std_shortopts[] =
-    {
-      '-', 'J',
+  static const char std_shortopts[] = {
+    '-', 'J',
 #ifndef WORKING_DOT_WORD
-      /* -K is not meaningful if .word is not being hacked.  */
-      'K',
+    /* -K is not meaningful if .word is not being hacked.  */
+    'K',
 #endif
-      'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
+    'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
 #ifndef VMS
-      /* -v takes an argument on VMS, so we don't make it a generic
-         option.  */
-      'v',
+    /* -v takes an argument on VMS, so we don't make it a generic
+       option.  */
+    'v',
 #endif
-      'w', 'X',
-      /* New option for extending instruction set (see also --itbl below)  */
-      't', ':',
-      '\0'
-    };
+    'w', 'X',
+    /* New option for extending instruction set (see also --itbl below)  */
+    't', ':',
+    '\0'
+  };
   struct option *longopts;
   extern struct option md_longopts[];
   extern size_t md_longopts_size;
@@ -419,8 +418,12 @@ parse_args (pargc, pargv)
     {"no-warn", no_argument, NULL, 'W'},
 #define OPTION_WARN (OPTION_STD_BASE + 18)
     {"warn", no_argument, NULL, OPTION_WARN},
-#define OPTION_WARN_FATAL (OPTION_STD_BASE + 19)
+#define OPTION_TARGET_HELP (OPTION_STD_BASE + 19)
+    {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
+#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20)
     {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+    /* When you add options here, check that they do not collide with
+       OPTION_MD_BASE.  See as.h.  */
   };
 
   /* Construct the option lists from the standard list and the target
@@ -474,7 +477,7 @@ parse_args (pargc, pargv)
                 VMS code in md_parse_option can return 0 in that case,
                 but it has no way of pushing the filename argument back.  */
              if (optarg && *optarg)
-               new_argv[new_argc++] = optarg,  new_argv[new_argc] = NULL;
+               new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL;
              else
 #else
              case 'v':
@@ -494,6 +497,10 @@ parse_args (pargc, pargv)
          new_argv[new_argc++] = optarg;
          new_argv[new_argc] = NULL;
          break;
+       
+       case OPTION_TARGET_HELP:
+          md_show_usage (stdout);
+          exit (EXIT_SUCCESS);
 
        case OPTION_HELP:
          show_usage (stdout);
This page took 0.024209 seconds and 4 git commands to generate.