This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add -g switch to GAS


Hi Richard,

Turning '-g' into a short option breaks MIPS, which has its own
-g<level> option.

Darn - sorry about that - I had not allowed for a -g switch which took an argument. I am checking in the patch below to rectify this.


Cheers
  Nick

gas/ChangeLog
2004-08-24  Nick Clifton  <nickc@redhat.com>

	* as.c (std_shortopts): Allow -g to take an optional argument.
	(parse_args): Pass any switch starting with -g on to the backend
	for parsing.


Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.53
diff -c -3 -p -r1.53 as.c
*** gas/as.c	17 Aug 2004 12:19:55 -0000	1.53
--- gas/as.c	24 Aug 2004 11:54:31 -0000
*************** parse_args (int * pargc, char *** pargv)
*** 385,391 ****
      /* -K is not meaningful if .word is not being hacked.  */
      'K',
  #endif
!     'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'g', 'I', ':', 'o', ':',
  #ifndef VMS
      /* -v takes an argument on VMS, so we don't make it a generic
         option.  */
--- 385,391 ----
      /* -K is not meaningful if .word is not being hacked.  */
      'K',
  #endif
!     'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'g', ':',':', 'I', ':', 'o', ':',
  #ifndef VMS
      /* -v takes an argument on VMS, so we don't make it a generic
         option.  */
*************** the GNU General Public License.  This pr
*** 671,681 ****
  	  break;
  
  	case 'g':
! 	  /* Some backends, eg Alpha, use the -g switch for their own
! 	     purposes.  So we check here for an explicit -g and allow
  	     the backend to decide if it wants to process it.  */
  	  if (   old_argv[optind - 1][1] == 'g'
- 	      && old_argv[optind - 1][2] == 0
  	      && md_parse_option (optc, optarg))
  	    continue;
  
--- 671,680 ----
  	  break;
  
  	case 'g':
! 	  /* Some backends, eg Alpha and Mips, use the -g switch for their
! 	     own purposes.  So we check here for an explicit -g and allow
  	     the backend to decide if it wants to process it.  */
  	  if (   old_argv[optind - 1][1] == 'g'
  	      && md_parse_option (optc, optarg))
  	    continue;
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]