This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Add -g switch to GAS
- From: Nick Clifton <nickc at redhat dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 12:59:58 +0100
- Subject: Re: [PATCH] Add -g switch to GAS
- References: <m3n00ux8fv.fsf@redhat.com> <87n00kx54u.fsf@redhat.com>
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;