aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2017-03-24 13:22:16 +0000
committerThomas Preud'homme <thomas.preudhomme@arm.com>2017-03-24 13:23:36 +0000
commit62785b09987359ede74a98fac11343827f7181af (patch)
tree31cf24224c2651b368771931ee3faebd93efb39f /gas/config/tc-arm.c
parentc72cea5aec39df2d7a105755691a61460ee64f59 (diff)
downloadgdb-62785b09987359ede74a98fac11343827f7181af.zip
gdb-62785b09987359ede74a98fac11343827f7181af.tar.gz
gdb-62785b09987359ede74a98fac11343827f7181af.tar.bz2
[GAS/ARM] Fix selected_cpu with default CPU and -mcpu
When GAS is compiled with DEFAULT_CPU set and then run with a -mcpu or -march option, selected_cpu will be set to the default CPU. This means the -mcpu is ignored which is surprising behavior. This commit instead sets selected_cpu from the value passed to -mcpu/-march. 2017-03-24 Thomas preud'homme <thomas.preudhomme@arm.com> gas/ * config/tc-arm.: (md_begin): Set selected_cpu from *mcpu_cpu_opt when CPU_DEFAULT is defined.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r--gas/config/tc-arm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index ef6b609..bbfe634 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -25040,8 +25040,8 @@ md_begin (void)
mcpu_cpu_opt = &cpu_default;
selected_cpu = cpu_default;
}
- else if (no_cpu_selected ())
- selected_cpu = cpu_default;
+ else
+ selected_cpu = *mcpu_cpu_opt;
#else
if (mcpu_cpu_opt)
selected_cpu = *mcpu_cpu_opt;