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: Adding support for AS argument "-force-long-branchs" for x86 arch


Nick Clifton <nickc@redhat.com> writes:

> 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'

Wait, this patch needs some more thought.  First of all, it's not the
case that -force-long-branches was treated as -f.  It was actually
treated as
    -f -o rce-long-branches
(You can see this if you also pass the -Z option.)  That is, short
options may be concatenated following a single dash.  So this patch is
actually a behaviour change, in that it will no longer work to do,
e.g.,
    -fW

I don't think we should casually change the behaviour of short options
in this way.  Being able to concatenate short options is standard Unix
behaviour mandated by POSIX.2.

Furthermore, if we are going to change it for -f, then we should
logically change it for all of the short options, and indeed we should
eliminate std_shortopts and md_shortopts entirely.  I don't think that
would be a good idea at all, as it might break existing scripts.

Ian


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