Commit Message

This patch makes driver options generated by specs pass through the
usual option handlers instead of special logic in do_self_spec to
parse them and identify option arguments.
This will mean that when multilib selection uses features set by
options, such options generated by driver specs are properly reflected
in the features set. It also means that the only place now using
SWITCH_TAKES_ARG and WORD_SWITCH_TAKES_ARG is the core option
processing machinery when handling unknown options. Thus there is no
longer any need for these macros to handle any option listed in the
.opt files, and a subsequent patch will remove such options from the
definitions of these macros (a step towards eliminating these target
macros completely, once every option they handle is in an appropriate
.opt file).
The changes in this patch to switch allocation during spec processing
in turn showed up that the code that swaps switch arrays to handle
-fcompare-debug needed to handle n_switches_alloc.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu. OK to
commit?
2010-10-23 Joseph Myers <joseph@codesourcery.com>
* gcc.c (n_switches_alloc_debug_check): New.
(set_option_handlers): New.
(process_command): Use set_option_handlers.
(do_self_spec): Pass spec-generated options through option
handlers.
(main): Also save and restore n_switches_alloc when swapping
switch arrays.