Hi all, This one is more meaty than the previous ones. It buffs up the parsing functions for the mcpu, march, mtune options, decouples them and makes them return an enum describing the errors that may occur. This will allow us to use these functions in other contexts beyond aarch64_override_options. aarch64_override_options itself gets an overhaul and is split up into code that must run only once after the command line option have been processed, and code that has to be run every time the backend-specific state changes (after SWITCHABLE_TARGET is implemented). The stuff that must be run every time the backend state changes is put into aarch64_override_options_internal. Also, this patch deletes the declarations of aarch64_{arch,cpu,tune}_string from aarch64.opt as they are superfluous since the march, mtune and mcpu option specification implicitly declares these variables. This patch looks large, but a lot of it is moving code around... Bootstrapped and tested as part of the series on aarch64. Ok for trunk? Thanks, Kyrill 2015-07-16 Kyrylo Tkachov * config/aarch64/aarch64.opt (aarch64_arch_string): Delete. (aarch64_cpu_string): Likewise. (aarch64_tune_string): Likewise. * config/aarch64/aarch64.c (aarch64_parse_opt_result): New enum. (aarch64_parse_extension): Return aarch64_parse_opt_result. Add extra argument to put result into. (aarch64_parse_arch): Likewise. Do not set selected_cpu. (aarch64_parse_cpu): Add arguments to put results into. Return aarch64_parse_opt_result. (aarch64_parse_tune): Likewise. (aarch64_override_options_after_change_1): New function. (aarch64_override_options_internal): New function. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Update to reflect above changes. Move some logic into aarch64_override_options_internal. Initialize target_option_default_node and target_option_current_node. (aarch64_override_options_after_change): Move logic into aarch64_override_options_after_change_1 and call it with global_options. (initialize_aarch64_code_model): Take a gcc_options pointer and use the flag values from that. 2015-07-06 Kyrylo Tkachov * gcc.target/aarch64/cpu-diagnostics-3.c: Update expected error string.