From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: [PATCH 3/4] x86-64: improve gas diagnostic when no 32-bit target is configured
Date: Fri, 19 May 2023 15:52:18 +0200 [thread overview]
Message-ID: <778a4bcd-ac39-6512-38d2-782e4eb1eea9@suse.com> (raw)
In-Reply-To: <f50385ac-6b82-7c84-c54b-0849e7650175@suse.com>
Make this similar to --64 and --x32: Check whether a suitable target
exists.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -14186,7 +14186,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:
next prev parent reply other threads:[~2023-05-19 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 13:50 [PATCH 0/4] x86: (mostly) testsuite adjustments Jan Beulich
2023-05-19 13:51 ` [PATCH 1/4] x86: split gas testsuite .exp file Jan Beulich
2023-05-19 13:51 ` [PATCH 2/4] x86-64: conditionalize tests using --32 Jan Beulich
2023-05-19 13:52 ` Jan Beulich [this message]
2023-05-19 13:52 ` [PATCH 4/4] iamcu: suppress tests which can't possibly work Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=778a4bcd-ac39-6512-38d2-782e4eb1eea9@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).