/* as.c - GAS main program.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001
+ 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include "macro.h"
#include "dwarf2dbg.h"
+#ifdef BFD_ASSEMBLER
+#include "bfdver.h"
+#endif
+
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
#else
#ifdef BFD_ASSEMBLER
fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
- VERSION, TARGET_ALIAS, BFD_VERSION);
+ VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
#else
fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
#endif
as if it were the argument of an option with character code 1. */
char *shortopts;
- extern CONST char *md_shortopts;
+ extern const char *md_shortopts;
static const char std_shortopts[] = {
'-', 'J',
#ifndef WORKING_DOT_WORD
static const struct option std_longopts[] = {
#define OPTION_HELP (OPTION_STD_BASE)
{"help", no_argument, NULL, OPTION_HELP},
+ /* getopt allows abbreviations, so we do this to stop it from
+ treating -k as an abbreviation for --keep-locals. Some
+ ports use -k to enable PIC assembly. */
+ {"keep-locals", no_argument, NULL, 'L'},
{"keep-locals", no_argument, NULL, 'L'},
{"mri", no_argument, NULL, 'M'},
#define OPTION_NOCPP (OPTION_STD_BASE + 1)
break;
case OPTION_TARGET_HELP:
- md_show_usage (stdout);
- exit (EXIT_SUCCESS);
+ md_show_usage (stdout);
+ exit (EXIT_SUCCESS);
case OPTION_HELP:
show_usage (stdout);
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
+#ifdef BFD_ASSEMBLER
+ printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
+#else
printf (_("GNU assembler %s\n"), VERSION);
- printf (_("Copyright 2001 Free Software Foundation, Inc.\n"));
+#endif
+ printf (_("Copyright 2002 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"));
*pargc = new_argc;
*pargv = new_argv;
+
+#ifdef md_after_parse_args
+ md_after_parse_args ();
+#endif
}
static long start_time;
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
if (debug_memory)
- {
-#ifdef BFD_ASSEMBLER
- extern long _bfd_chunksize;
- _bfd_chunksize = 64;
-#endif
- chunksize = 64;
- }
+ chunksize = 64;
#ifdef HOST_SPECIAL_INIT
HOST_SPECIAL_INIT (argc, argv);