[PATCH] x86: restrict gas'es recognition of -s to Solaris
Jan Beulich
jbeulich@suse.com
Thu Nov 21 12:39:34 GMT 2024
When there for Solaris compatibility only, also recognize it only there.
This way the option becomes available for other possible uses.
While adjusting md_shortopts[], also re-arrange things such that we have
only a single, uniform definition of it.
---
Arguably -k should then also be limited to TE_FreeBSD.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -16706,11 +16706,14 @@ bool i386_record_operator (operatorT op,
}
#endif
+const char md_shortopts[] =
#ifdef OBJ_ELF
-const char md_shortopts[] = "kVQ:sqnO::";
-#else
-const char md_shortopts[] = "qnO::";
+ "kVQ:"
+# ifdef TE_SOLARIS
+ "s"
+# endif
#endif
+ "qnO::";
#define OPTION_32 (OPTION_MD_BASE + 0)
#define OPTION_64 (OPTION_MD_BASE + 1)
@@ -16834,10 +16837,12 @@ md_parse_option (int c, const char *arg)
case 'k':
break;
+# ifdef TE_SOLARIS
case 's':
/* -s: On i386 Solaris, this tells the native assembler to use
.stab instead of .stab.excl. We always use .stab anyhow. */
break;
+# endif
case OPTION_MSHARED:
shared = 1;
More information about the Binutils
mailing list