This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Does -march=r5000 imply HAVE_64BIT_GPRS?
On Thu, Aug 16, 2001 at 11:26:27PM +0200, Thiemo Seufer wrote:
> Well, it links my experimental mips64-linux kernel and also some
> toy programs and passes "make check". So there are at least some
> cases where it doesn't break the linker. :-)
>
> H.J., you have started this thread, could you please test if
> my patch works for you also?
>
>
I prefer this patch.
H.J.
-----
2001-08-16 H.J. Lu <hjl@gnu.org>
* gas/config/tc-mips.c (md_begin): Use -mipsN to set the BFD
arch.
--- gas/config/tc-mips.c.isa Thu Aug 16 14:40:35 2001
+++ gas/config/tc-mips.c Thu Aug 16 14:48:51 2001
@@ -972,6 +972,7 @@ md_begin ()
char *a = NULL;
int broken = 0;
int mips_isa_from_cpu;
+ int bfd_mips_arch;
int target_cpu_had_mips16 = 0;
const struct mips_cpu_info *ci;
@@ -1096,7 +1097,20 @@ md_begin ()
&& ISA_HAS_64BIT_REGS (mips_isa_from_cpu))
mips_32bitmode = 1;
- if (! bfd_set_arch_mach (stdoutput, bfd_arch_mips, mips_arch))
+ if (mips_opts.isa != mips_isa_from_cpu)
+ {
+ const struct mips_cpu_info *isa_ci;
+
+ /* -march=xxxx is not compatible with -mipsN. We use -mipsN to
+ set the BFD arch. */
+ isa_ci = mips_cpu_info_from_isa (mips_opts.isa);
+ assert (isa_ci != NULL);
+ bfd_mips_arch = isa_ci->cpu;
+ }
+ else
+ bfd_mips_arch = mips_arch;
+
+ if (! bfd_set_arch_mach (stdoutput, bfd_arch_mips, bfd_mips_arch))
as_warn (_("Could not set architecture and machine"));
file_mips_isa = mips_opts.isa;