diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-04-11 14:57:41 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-04-11 14:57:41 +0000 |
commit | 49ee7535591e66a6e602cc5fd3b399c482ce12c7 (patch) | |
tree | 44a7142776ddcde47a9abaa0389174b3ddbe96e5 /gcc/config/arm | |
parent | 25a5ce2729617bbd2108d67bfc61f42e1c5021f4 (diff) | |
download | gcc-49ee7535591e66a6e602cc5fd3b399c482ce12c7.tar.gz |
[arm] PR 80389 - if architecture and cpu mismatch, don't print an architecture name as a CPU name
In this PR we incorrectly print the architecture name in a .cpu
directive in the assembly file when the -mcpu and -march options
conflict (don't target the same base architecture). In this case the
.arch overrides the .cpu directive and we should emit a .arch option.
PR target/80389
* config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch conflict,
set target->arch_name instead of target->cpu_name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a9b61a33942..a2d80cfd645 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3098,15 +3098,15 @@ arm_configure_build_target (struct arm_build_target *target, arm_selected_tune = arm_selected_cpu; arm_selected_cpu = arm_selected_arch; + target->arch_name = arm_selected_arch->name; } else { /* Architecture and CPU are essentially the same. Prefer the CPU setting. */ arm_selected_arch = NULL; + target->core_name = arm_selected_cpu->name; } - - target->core_name = arm_selected_cpu->name; } else { |