aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-10-11 08:20:33 +0200
committerJan Beulich <jbeulich@suse.com>2024-10-11 08:20:33 +0200
commitd55d7b35c4e64f419532c9a68a32f4952119ee66 (patch)
tree3efd1a3c6047b7d9a6ce1bc630f8be39fac3e731
parent29ed50151ab5905776eb3d5a956ac964ea852342 (diff)
downloadgdb-d55d7b35c4e64f419532c9a68a32f4952119ee66.zip
gdb-d55d7b35c4e64f419532c9a68a32f4952119ee66.tar.gz
gdb-d55d7b35c4e64f419532c9a68a32f4952119ee66.tar.bz2
x86: bring 64-bit-only cmdline option handling in sync
--64 and --x32 are already suppressed in --help output when BFD64 is not defined. Also avoid recognizing these options in such configurations.
-rw-r--r--gas/config/tc-i386.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index ab249ce..cdefde0 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -16799,11 +16799,14 @@ const char *md_shortopts = "qnO::";
struct option md_longopts[] =
{
{"32", no_argument, NULL, OPTION_32},
-#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
+#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O)) \
+ && defined (BFD64)
{"64", no_argument, NULL, OPTION_64},
#endif
#ifdef OBJ_ELF
+# ifdef BFD64
{"x32", no_argument, NULL, OPTION_X32},
+# endif
{"mshared", no_argument, NULL, OPTION_MSHARED},
{"mx86-used-note", required_argument, NULL, OPTION_X86_USED_NOTE},
#endif
@@ -16895,9 +16898,10 @@ md_parse_option (int c, const char *arg)
else
as_fatal (_("invalid -mx86-used-note= option: `%s'"), arg);
break;
+#endif
+#ifdef BFD64
-#endif
#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
case OPTION_64:
{
@@ -16940,6 +16944,8 @@ md_parse_option (int c, const char *arg)
break;
#endif
+#endif /* BFD64 */
+
case OPTION_32:
{
const char **list, **l;