projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7aee0b
)
x86-64: improve gas diagnostic when no 32-bit target is configured
author
Jan Beulich
<jbeulich@suse.com>
Fri, 26 May 2023 08:14:13 +0000
(10:14 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Fri, 26 May 2023 08:14:13 +0000
(10:14 +0200)
Make this similar to --64 and --x32: Check whether a suitable target
exists.
gas/config/tc-i386.c
patch
|
blob
|
history
diff --git
a/gas/config/tc-i386.c
b/gas/config/tc-i386.c
index 74b2d25238133638d048b5af4a9794d6fc32d274..690f6ee060d1865a90c5998b87faf303bda75929 100644
(file)
--- 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: