[arm] Use strings for -march, -mcpu and -mtune options
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 16 Jun 2017 21:01:22 +0000 (21:01 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 16 Jun 2017 21:01:22 +0000 (21:01 +0000)
commit80448ef60264c49c8b08e700b64a5d338d3806ba
tree9dc74e23fa1ae46264d4e3bef30f5423004104b7
parentb3d8d88efa4d8467d3b0657cc8a4a3e1913d939c
[arm] Use strings for -march, -mcpu and -mtune options

In order to support more complex specifications for cpus and architectures
we need to move away from using enumerations to represent the set of
permitted options.  This basic change just moves the option parsing
infrastructure over to that, but changes nothing more beyond generating
a hint when the specified option does not match a known target (previously
the help option was able to print out all the permitted values, but we
can no-longer do that.

* config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
(x_arm_cpu_string, x_arm_tune_string): Likewise.
(march, mcpu, mtune): Convert to string-based options.
* config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
(arm_parse_arch_cpu_name): New function.
(arm_configure_build_target): Use arm_parse_arch_cpu_name to
identify selected architecture or CPU.
(arm_option_save): New function.
(TARGET_OPTION_SAVE): Redefine.
(arm_option_restore): Restore string options.
(arm_option_print): Print string options.

From-SVN: r249279
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.opt