Adding support for AS argument "-force-long-branchs" for x86 arch
Nick Clifton
nickc@redhat.com
Sat Oct 4 12:06:00 GMT 2003
Hi Kristis,
> I had requested to the GCC developers the feature of adding support
> for the -force-long-branchs argument in the AS assembler for the x86
> architecture, as decsibed in
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12502. They have redirected
> me to the binutils maintainers.
>
> Please advice if adding this feature is possible. (Please read the
> entire bugzilla entry)
The feature is possible, although as far as I know nobody is working
upon adding it. If you would like to work on this feature please feel
free.
The bugzilla case does expose a problem with the assembler however -
it assumes that the "-force-long-branches" switch is actually "-f",
meaning "do not remove pre-processor syntax from the input file",
which is why you are getting those strange error messages.
I am going to apply the patch below to fix this, so that now running:
gcc -Wall -Wa,-force-long-branchs -O2 test10.c
will generate:
as: unrecognised option `-force-long-branches'
Cheers
Nick
gas/ChangeLog
2003-10-04 Nick Clifton <nickc@redhat.com>
* as.c (std_shortopts): Remove 'f'.
(std_longopts): Add 'f'. Doing this prevents -f<foo> being
acecpted as an alias for -f.
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.46
diff -c -3 -p -r1.46 as.c
*** gas/as.c 4 Jun 2003 16:54:45 -0000 1.46
--- gas/as.c 4 Oct 2003 12:01:12 -0000
*************** parse_args (pargc, pargv)
*** 375,381 ****
/* -K is not meaningful if .word is not being hacked. */
'K',
#endif
! 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
#ifndef VMS
/* -v takes an argument on VMS, so we don't make it a generic
option. */
--- 375,381 ----
/* -K is not meaningful if .word is not being hacked. */
'K',
#endif
! 'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
#ifndef VMS
/* -v takes an argument on VMS, so we don't make it a generic
option. */
*************** parse_args (pargc, pargv)
*** 449,454 ****
--- 449,460 ----
#define OPTION_NOEXECSTACK (OPTION_STD_BASE + 21)
{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK},
#endif
+ /* Treat '-f' as a long switch so that getopt will not accept
+ -f<some-text> as a synonym for -f. This can cause confusion
+ when -f switches are passed through from the compiler.
+ FIXME - should we handle other single character switches in the
+ same way ? */
+ {"f", no_argument, NULL, 'f'},
#define OPTION_WARN_FATAL (OPTION_STD_BASE + 22)
{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
/* When you add options here, check that they do not collide with
More information about the Binutils
mailing list