summaryrefslogtreecommitdiffstats
path: root/gcc/common
diff options
context:
space:
mode:
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-20 11:32:32 +0000
committerjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-20 11:32:32 +0000
commit03189b5b6787e38a2e28c5663e16d8fa1eb69fc9 (patch)
tree0f72a08d989156923d4ad477e3da76e54d4867d2 /gcc/common
parent8ef52e3527d8e7094ec1e841a6b2d5aecfa4b45b (diff)
downloadppe42-gcc-03189b5b6787e38a2e28c5663e16d8fa1eb69fc9.tar.gz
ppe42-gcc-03189b5b6787e38a2e28c5663e16d8fa1eb69fc9.zip
[AArch64] Fix behaviour of -mcpu option to match ARM.
gcc/ * common/config/aarch64/aarch64-common.c (aarch64_handle_option): Don't handle any option order logic here. * config/aarch64/aarch64.c (aarch64_parse_arch): Do not override selected_cpu, warn on architecture version mismatch. (aarch64_override_options): Fix parsing order for option strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/aarch64/aarch64-common.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c
index 135a9bcbdd2..6107007ed41 100644
--- a/gcc/common/config/aarch64/aarch64-common.c
+++ b/gcc/common/config/aarch64/aarch64-common.c
@@ -52,10 +52,10 @@ static const struct default_options aarch_option_optimization_table[] =
/* Implement TARGET_HANDLE_OPTION.
This function handles the target specific options for CPU/target selection.
- march wins over mcpu, so when march is defined, mcpu takes the same value,
- otherwise march remains undefined. mtune can be used with either march or
- mcpu. If march and mcpu are used together, the rightmost option wins.
- mtune can be used with either march or mcpu. */
+ -mcpu=CPU is shorthand for -march=ARCH_FOR_CPU, -mtune=CPU.
+ If either of -march or -mtune is given, they override their
+ respective component of -mcpu. This logic is implemented
+ in config/aarch64/aarch64.c:aarch64_override_options. */
static bool
aarch64_handle_option (struct gcc_options *opts,
@@ -70,12 +70,10 @@ aarch64_handle_option (struct gcc_options *opts,
{
case OPT_march_:
opts->x_aarch64_arch_string = arg;
- opts->x_aarch64_cpu_string = arg;
return true;
case OPT_mcpu_:
opts->x_aarch64_cpu_string = arg;
- opts->x_aarch64_arch_string = NULL;
return true;
case OPT_mtune_:
OpenPOWER on IntegriCloud