aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2001-08-21 01:13:05 +0000
committerThiemo Seufer <ths@networkno.de>2001-08-21 01:13:05 +0000
commit1ff54a84b46d25a8ef7f3c316c38cf994086cef2 (patch)
tree5e804d307dc8fdcfd4ff2254ce4674f4fa8ae931
parent4e89ac30f3bf3708a601009e42e8b5570abf1f9e (diff)
downloadgdb-1ff54a84b46d25a8ef7f3c316c38cf994086cef2.zip
gdb-1ff54a84b46d25a8ef7f3c316c38cf994086cef2.tar.gz
gdb-1ff54a84b46d25a8ef7f3c316c38cf994086cef2.tar.bz2
* tc_mips.c (md_begin): Warn about incompatibility between -march=FOO
and -mipsN option, continue with default ISA.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c18
2 files changed, 22 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 526d5df..ed71bd4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2001-08-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * tc_mips.c (md_begin): Warn about incompatibility between -march=FOO
+ and -mipsN option, continue with default ISA.
+
+2001-08-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* config/tc-mips.c (md_parse_option): #ifdef the
traditional/non-traditional names as it is done in mips_target_format.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index b666ed9..6cd1f83 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -1010,7 +1010,23 @@ md_begin ()
the command line, or will be set otherwise if one was. */
if (mips_arch != CPU_UNKNOWN && mips_opts.isa != ISA_UNKNOWN)
{
- /* We have it all. There's nothing to do. */
+ /* We have to check if the isa is the default isa of arch. Otherwise
+ we'll get invalid object file headers. */
+ ci = mips_cpu_info_from_cpu (mips_arch);
+ assert (ci != NULL);
+ if (mips_opts.isa != ci->isa)
+ {
+ /* This really should be an error instead of a warning, but old
+ compilers only have -mcpu which sets both arch and tune. For
+ now, we discard arch and preserve tune. */
+ as_warn (_("The -march option is incompatible to -mipsN and "
+ "therefore ignored."));
+ if (mips_tune == CPU_UNKNOWN)
+ mips_tune = mips_arch;
+ ci = mips_cpu_info_from_isa (mips_opts.isa);
+ assert (ci != NULL);
+ mips_arch = ci->cpu;
+ }
}
else if (mips_arch != CPU_UNKNOWN && mips_opts.isa == ISA_UNKNOWN)
{