[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MIPS32 - binutils-2.41
From: |
Pete Restall |
Subject: |
Re: MIPS32 - binutils-2.41 |
Date: |
Tue, 14 Nov 2023 13:13:32 +0000 |
User-agent: |
Evolution 3.50.1 (3.50.1-1.fc39) |
Afternoon, Nick. Thanks for getting back to me.
On Tue, 2023-11-14 at 12:28 +0000, Nick Clifton wrote:
> Hi Pete,
>
> > I've been attempting to build a cross-compiler for a MIPS32
> > microcontroller (specifically an M14KE) and I've been running into
> > problems that appear to stem from binutils silently coalescing
> > 'mips32'
> > into 'mips64'.
>
> What specifically are these problems ?
The initial problem was that when I was building gcc after what I
thought was a successful binutils build but there were complaints about
incompatible ABIs. I tracked this back to what I thought was the
binutils configure script assuming a 64-bit CPU even though my triplet
started with 'mips32-'. I believe it's the target normalisation in
config.sub (line 1055) that does it:
mips3*-*)
cpu=mips64
;;
That doesn't seem quite right to me but I don't know much about
binutils to know what the rationale is for that transformation.
Since posting I've tried a few other triplets and gone down another few
dead ends that cause gcc / ld mismatches (littlemips vs. tradlittlemips
for example with a 'mipsel-none-elf' target) but I think I've cracked
it. Imagination used to distribute a pre-built toolchain for this
microcontroller and they targetted 'mips-mti-elf', which I can see sets
various options which the non-vendor targets don't.
TL;DR - I've got something that (I think...) works now by using 'mips-
mti-elf', but I'm unsure whether my initial post about the 'mips32-*'
targets being silently coalesced into 'mips64-*' by the configure
scripts is a bug or not, nor what the fix would be. I'm happy to raise
a bug report if you think that config.sub clause is a typo.
Cheers,
Pete Restall