diff options
author | Alan Modra <amodra@gmail.com> | 2001-01-12 03:34:49 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-01-12 03:34:49 +0000 |
commit | 6e0b89ee6c97bd3145b27d67b20514f907e5fefd (patch) | |
tree | 9118ab031a002b8c45044f4b86b786dd1e2e4ac1 /gas/config/tc-i386.c | |
parent | 0d2bcfafbfc1ede123ec9d61813745d775c5251c (diff) | |
download | gdb-6e0b89ee6c97bd3145b27d67b20514f907e5fefd.zip gdb-6e0b89ee6c97bd3145b27d67b20514f907e5fefd.tar.gz gdb-6e0b89ee6c97bd3145b27d67b20514f907e5fefd.tar.bz2 |
Cure recent x86 warts.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fb2384b..7cca4cf 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4366,11 +4366,14 @@ const char *md_shortopts = "kVQ:sq"; #else const char *md_shortopts = "q"; #endif + struct option md_longopts[] = { #define OPTION_32 (OPTION_MD_BASE + 0) {"32", no_argument, NULL, OPTION_32}, +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) #define OPTION_64 (OPTION_MD_BASE + 1) {"64", no_argument, NULL, OPTION_64}, +#endif {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); @@ -4405,36 +4408,29 @@ md_parse_option (c, arg) /* -s: On i386 Solaris, this tells the native assembler to use .stab instead of .stab.excl. We always use .stab anyhow. */ break; -#endif -#ifdef OBJ_ELF - case OPTION_32: + case OPTION_64: { const char **list, **l; - default_arch = c == OPTION_32 ? "i386" : "x86_64"; list = bfd_target_list (); for (l = list; *l != NULL; l++) - { - if (c == OPTION_32) - { - if (strcmp (*l, "elf32-i386") == 0) - break; - } - else - { - if (strcmp (*l, "elf64-x86-64") == 0) - break; - } - } + if (strcmp (*l, "elf64-x86-64") == 0) + { + default_arch = "x86_64"; + break; + } if (*l == NULL) - as_fatal (_("No compiled in support for %d bit object file format"), - c == OPTION_32 ? 32 : 64); + as_fatal (_("No compiled in support for x86_64")); free (list); } break; #endif + case OPTION_32: + default_arch = "i386"; + break; + default: return 0; } |