[binutils-gdb] x86: restrict gas'es recognition of -s to Solaris

Jan Beulich jbeulich@sourceware.org
Fri Nov 29 08:38:13 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e6fdecde3a85fc81fea6722458e6319fbe81cb7

commit 0e6fdecde3a85fc81fea6722458e6319fbe81cb7
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Nov 29 09:37:33 2024 +0100

    x86: restrict gas'es recognition of -s to Solaris
    
    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.

Diff:
---
 gas/config/tc-i386.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 55fd2be8b30..e3a7c972e84 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -16738,11 +16738,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)
@@ -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;


More information about the Binutils-cvs mailing list