]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: restrict gas'es recognition of -s to Solaris
authorJan Beulich <jbeulich@suse.com>
Fri, 29 Nov 2024 08:37:33 +0000 (09:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 29 Nov 2024 08:37:33 +0000 (09:37 +0100)
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.

gas/config/tc-i386.c

index 55fd2be8b30cd2c7349e863260d608ca8c9e3022..e3a7c972e846385d71b1444a002a7b98c7dbc44f 100644 (file)
@@ -16738,11 +16738,14 @@ bool i386_record_operator (operatorT op,
 }
 #endif
 \f
+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)
@@ -16866,10 +16869,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;