aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-05-26 10:14:13 +0200
committerJan Beulich <jbeulich@suse.com>2023-05-26 10:14:13 +0200
commit590a0fed02a2e414b83a92128ec8e85a7892a85c (patch)
tree89404bddabec42f2fa43dfc4d8510feee32c681e /gas
parenta7aee0b5770d7c1c41ec38128729b9e6fd077ae4 (diff)
downloadfsf-binutils-gdb-590a0fed02a2e414b83a92128ec8e85a7892a85c.zip
fsf-binutils-gdb-590a0fed02a2e414b83a92128ec8e85a7892a85c.tar.gz
fsf-binutils-gdb-590a0fed02a2e414b83a92128ec8e85a7892a85c.tar.bz2
x86-64: improve gas diagnostic when no 32-bit target is configured
Make this similar to --64 and --x32: Check whether a suitable target exists.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 74b2d25..690f6ee 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -14188,7 +14188,21 @@ md_parse_option (int c, const char *arg)
#endif
case OPTION_32:
- default_arch = "i386";
+ {
+ const char **list, **l;
+
+ list = bfd_target_list ();
+ for (l = list; *l != NULL; l++)
+ if (strstr (*l, "-i386")
+ || strstr (*l, "-go32"))
+ {
+ default_arch = "i386";
+ break;
+ }
+ if (*l == NULL)
+ as_fatal (_("no compiled in support for ix86"));
+ free (list);
+ }
break;
case OPTION_DIVIDE: