[PATCH bfin] Call as_fatal for bad -mcpu option

Jie Zhang jie.zhang@analog.com
Thu Sep 3 18:08:00 GMT 2009


Since we have already reported to user on bad -mcpu option in Blackfin 
md_parse_option, we could just call as_fatal instead of error, 
otherwise, gas generic option parse code will report the error again. 
The worse is that code is not suitable for reporting error for long 
option, the index of long option will be printed out as a bogus char. 
Like this:

$ bfin-uclinux-as -mcpu=
Assembler messages:
Error: -mcpu= is not valid
Error: unrecognized option -?

$ bfin-uclinux-as -mcpu=bf516-0.11
Error: -mcpu=bf516-0.11 has invalid silicon revision
Error: unrecognized option -?bf516-0.11

With this patch

$ ./as-new -mcpu=
Assembler messages:
Fatal error: -mcpu= is not valid
$ ./as-new -mcpu=bf516-0.11Assembler messages:
Fatal error: -mcpu=bf516-0.11 has invalid silicon revision


Committed.


Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-bfin-as-fatal-on-bad-mcpu.diff
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090903/4c395675/attachment.bin>


More information about the Binutils mailing list