From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id C9AEF3858C39; Fri, 26 May 2023 08:14:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9AEF3858C39 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jan Beulich To: bfd-cvs@sourceware.org Subject: [binutils-gdb] x86-64: improve gas diagnostic when no 32-bit target is configured X-Act-Checkin: binutils-gdb X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: a7aee0b5770d7c1c41ec38128729b9e6fd077ae4 X-Git-Newrev: 590a0fed02a2e414b83a92128ec8e85a7892a85c Message-Id: <20230526081453.C9AEF3858C39@sourceware.org> Date: Fri, 26 May 2023 08:14:53 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2023 08:14:53 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D590a0fed02a2= e414b83a92128ec8e85a7892a85c commit 590a0fed02a2e414b83a92128ec8e85a7892a85c Author: Jan Beulich Date: Fri May 26 10:14:13 2023 +0200 x86-64: improve gas diagnostic when no 32-bit target is configured =20 Make this similar to --64 and --x32: Check whether a suitable target exists. Diff: --- gas/config/tc-i386.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 74b2d252381..690f6ee060d 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 =20 case OPTION_32: - default_arch =3D "i386"; + { + const char **list, **l; + + list =3D bfd_target_list (); + for (l =3D list; *l !=3D NULL; l++) + if (strstr (*l, "-i386") + || strstr (*l, "-go32")) + { + default_arch =3D "i386"; + break; + } + if (*l =3D=3D NULL) + as_fatal (_("no compiled in support for ix86")); + free (list); + } break; =20 case OPTION_DIVIDE: