aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorMichael Tiemann <tiemann@cygnus>1994-11-26 00:17:52 +0000
committerMichael Tiemann <tiemann@cygnus>1994-11-26 00:17:52 +0000
commitfb870b50a7fb8e68a4412f0c0e133de0f2844447 (patch)
tree6e85d5d7a4db535fd8fc1e6a530fdac169b4ad8e /gas/as.c
parent52e895cbb4ca54301e9bd239967f7f42407eeea4 (diff)
downloadgdb-fb870b50a7fb8e68a4412f0c0e133de0f2844447.zip
gdb-fb870b50a7fb8e68a4412f0c0e133de0f2844447.tar.gz
gdb-fb870b50a7fb8e68a4412f0c0e133de0f2844447.tar.bz2
Add changes from customer since last work.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/gas/as.c b/gas/as.c
index 0eebdd3..5d69aa3 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -144,12 +144,10 @@ parse_args (pargc, pargv)
char *shortopts;
extern CONST char *md_shortopts;
- /* -v takes an argument on VMS, so we don't make it a generic option
- in that case. */
-#ifdef OBJ_VMS
+#ifdef VMS
+ /* -v takes an argument on VMS, so we don't make it a generic option. */
CONST char *std_shortopts = "-JKLRWZfa::DI:o:wX";
#else
- /* Normal set of short options. */
CONST char *std_shortopts = "-JKLRWZfa::DI:o:vwX";
#endif
@@ -167,6 +165,8 @@ parse_args (pargc, pargv)
{"version", no_argument, NULL, OPTION_VERSION},
#define OPTION_DUMPCONFIG (OPTION_STD_BASE + 4)
{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG},
+#define OPTION_VERBOSE (OPTION_STD_BASE + 5)
+ {"verbose", no_argument, NULL, OPTION_VERBOSE},
};
/* Construct the option lists from the standard list and the
@@ -203,9 +203,28 @@ parse_args (pargc, pargv)
default:
/* md_parse_option should return 1 if it recognizes optc,
0 if not. */
- if (md_parse_option (optc, optarg) == 0)
- exit (EXIT_FAILURE);
- break;
+ if (md_parse_option (optc, optarg) != 0)
+ break;
+ /* `-v' isn't included in the general short_opts list, so check for
+ it explicity here before deciding we've gotten a bad argument. */
+ if (optc == 'v')
+ {
+#ifdef VMS
+ /* Telling getopt to treat -v's value as optional can result
+ in it picking up a following filename argument here. The
+ 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;
+ else
+#else
+ case 'v':
+#endif
+ case OPTION_VERBOSE:
+ print_version_id ();
+ break;
+ }
+ /*FALLTHRU*/
case '?':
exit (EXIT_FAILURE);
@@ -244,9 +263,6 @@ parse_args (pargc, pargv)
#endif
exit (EXIT_SUCCESS);
- case 'v':
- print_version_id ();
-
case 'J':
flag_signed_overflow_ok = 1;
break;
@@ -398,6 +414,11 @@ main (argc, argv)
#ifdef TC_I960
brtab_emit ();
#endif
+/* start-sanitize-rce */
+#ifdef TC_RCE
+ dump_literals(0);
+#endif
+/* end-sanitize-rce */
if (seen_at_least_1_file ()
&& !((had_warnings () && flag_always_generate_output)